Skip to content

Latest commit

 

History

History
119 lines (72 loc) · 3.42 KB

apt-btrfs-snapshot.pod

File metadata and controls

119 lines (72 loc) · 3.42 KB

NAME

apt-btrfs-snapshot - Integrate btrfs snapshots with APT

SYNOPSIS

apt-btrfs-snapshot [-h | --help | --debug | --test] { supported | tree | show snapshot | status | list | list-older-than | create [-t tag]| tag snapshot tag | set-default snapshot [-t tag] | rollback [-n number] [-t tag] | delete snapshot | clean delete-older-than daysd }

DESCRIPTION

apt-btrfs-snapshot is used to create and manage snapshots of the root filesystem. An APT hook is also installed to automatically create a snapshot every time APT is run.

apt-btrfs-snapshot tracks the hierarchy of snapshots and the dpkg package operations that happen in between.

ACTIONS

supported

Tells the user if the system supports snapshots. If snapshots are not supported, returns with a non-zero exit code.

tree

Gives a tree view of all known snapshots showing the branches of their ancestry. Each line shows how many packages were install (+number), upgraded (^number) and removed (-number) since the previous snapshot was taken.

show snapshot

Show information pertaining to the snapshot including its parent snapshot and the package installs, upgrades, removes, etc. since its parent snapshot was taken.

status

Show when the parent snapshot was taken and the package operations that have occurred since.

list

Lists all available snapshots.

list-older-than daysd

Lists all snapshots older than days days.

create [-t tag]

Creates a new snapshot, optionally adding the specified tag to its name.

tag snapshot tag

Adds/replaces the tag added to the snapshot name after the date.

set-default snapshot [-t tag]

Backs up the current root, optionally adding the specified tag to its name. And restores a copy of snapshot.

You will have to reboot after this operation.

rollback [-n n] [-t tag]

Backs up the current root, optionally adding the specified tag to its name. Then restores a copy of the nth ancestor of the current root.

You will have to reboot after this operation.

delete snapshot

Deletes a snapshot. The parent and package operation information will be combined with the information stored in its children.

delete-older-than daysd

Deletes snapshots older than days days. The value "0d" can be used to delete all days. Tagged snapshots will not be deleted, nor will those at the junction of branches. These snapshots can always be manually deleted.

clean

The apt cache for downloaded deb files can get quite large, hence the apt-get clean command. This command deletes the deb files cached in the snapshots. Thereby freeing space.

NOTES

Snapshot creation will not happen if another snapshot has been created within the last minute, unless you specify a tag. Stops Ubuntu's update manager provoking four snapshots in quick succession each time.

In addition, if the environment variable APT_NO_SNAPSHOTS is set when apt-btrfs-snapshot is run, no snapshots will be created unless a tag is specified. Useful when you will be installing several small packages and don't need a snapshot every time.

Tagging can serve to remind you why you abandoned a snapshot. Or to remind you of the value of one snapshot. Or to make sure important old snapshots are never deleted.

SEE ALSO

apt.conf(5) btrfs(8)