Skip to content

snapshot

Dilshat edited this page Mar 1, 2019 · 12 revisions

Snapshot

Allows to create snapshots of container partitions and rollback them.

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

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

Parameters

  • 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/subutai/lxc/foo, for partition home it is /var/lib/subutai/lxc/foo/home. all is applicable to create, rollback and remove commands and means all home, rootfs, var, opt and config.

  • Parameter --label specifies a unique name of snapshot

  • Parameter --stop applicable to create and rollback commands, indicates whether to stop container when doing the specified operation

  • Parameter --force applicable to rollback command, indicates whether to remove all more recent snapshots if any when rolling back to specified one