-
Notifications
You must be signed in to change notification settings - Fork 15
snapshot
Allows to create snapshots of container partitions and rollback them, send snapshots to a file and recreate container filesystem from the file
usage: subutai snapshot <command> [<args> ...]
Options:
snapshot create --container=CONTAINER --partition=PARTITION --label=LABEL [<flags>]
Create snapshot
snapshot remove --container=CONTAINER --partition=PARTITION --label=LABEL
Remove snapshot
snapshot list [<flags>]
List snapshots
snapshot rollback --container=CONTAINER --partition=PARTITION --label=LABEL [<flags>]
Rollback to snapshot
snapshot send --container=CONTAINER --label(s)=LABEL(S) [<flags>]
Send snapshots to file
snapshot receive --container=CONTAINER --file=FILE
Receive snapshots from a file
Example:
subutai snapshot create --container foo --partition home --label snap-01012019
subutai snapshot list
subutai snapshot list --container foo
subutai snapshot list --container foo --partition rootfs
subutai snapshot remove --container foo --partition home --label snap-01012019
subutai snapshot rollback --container foo --partition home --label snap-01012019
subutai snapshot send --container foo --label snap-01012019
subutai snapshot send --container foo --label snap-01012019,snap-01022019
subutai snapshot receive --container bar --file /var/cache/subutai/foo_snap-01012019.tar.gz
-
Parameter
--container
specifies a name of target container -
Parameter
--partition
specifies a target partition of container (home|rootfs|var|opt|config|all). config means parent dataset of container that contains lxc config file e.g. for container foo it is/var/lib/lxc/foo
, for partition home it is/var/lib/lxc/foo/home
. all is applicable to create, rollback and remove commands and means allhome, rootfs, var, opt and config
. -
Parameter
--label
specifies a unique name of snapshot, forsubutai snapshot send
command can contain two snapshots names separated by comma (no space!) -
Parameter
--stop
applicable to create and rollback commands, indicates whether to stop container when doing the specified operation -
Parameter
--force
applicable torollback
command, indicates whether to remove all more recent snapshots if any when rolling back to specified one -
Parameter
--file
full path to file containing snapshots
To restore a container, after using the subutai snapshot receive ...
command, the command subutai restore ...
must be executed:
subutai restore bar -e {env-id} -n {ip/mask vlan} -s {secret}
for parameters description, see clone