Fileset Examples
CommunityEnterpriseIn the example below, all Docker containers, images and volumes will be backed up.
Fileset {
Name = FS_DockerAll
Include {
Plugin = "docker:"
}
}
In this example, a single Docker container with name-label of “mcache1” will be backed up.
Fileset {
Name = FS_Docker_mcache1
Include {
Plugin = "docker: container=mcache1"
}
}
The same example as above, but using container id instead:
Fileset {
Name = FS_Docker_mcache1
Include {
Plugin = "docker: container=cd77eb89e59a"
}
}
In the following example, all Docker containers which contain “ngnix” in their names will be backed up.
Fileset {
Name = FS_Docker_nginixAll
Include {
Plugin = "docker: include_container=ngnix"
}
}
In this final example, all Docker containers except whose names begins with “test” will be backed up.
Fileset {
Name = FS_Docker_AllbutTest
Include {
Plugin = "docker: include_container=.* exclude_container=^test"
}
}
In this final example, a single Docker volume will be backed up.
Fileset {
Name = FS_Docker_Volume
Include {
Plugin = "docker: volume=myvolume"
}
}
In this final example, a single Docker container with all mounted volumes will be backed up.
Fileset {
Name = FS_Docker_Container_VolumeAll
Include {
Plugin = "docker: container=mycontainer allvolumes"
}
}
In the example below, all Docker objects will be backed up using remote docker host.
Fileset {
Name = FS_RemoteDockerAll
Include {
Plugin = "docker: docker_host=tcp://10.0.0.1:2376"
}
}
See also
Previous articles:
Go back to: Docker: Configuration.