Btrfs snapshot / revert
07 May 2018How to work with snaphots in Ubuntu's layout
In order to work with snapshots of / or /home in the Ubuntu layout it is very convenient to mount the btrfs filesystem at a separate location, and work from the top of the btrfs tree, rather than from the mounted subvolumes.
1
|
|
Create snapshots
To create a snapshot use
1 2 3 4 5 6 |
|
this will create a snapshot of the @ subvolume named @_snapshot located also in the top of the btrfs tree.
Rollback to a snapshot
To roll back to a snapshot, you simply need to change its name to the name that ubuntu mounts, using
1 2 |
|
and reboot.
Delete a snapshot To delete a snapshot use
1
|
|
btrfs snapshots are subvolumes in themselves, and self-contained, deleting the old @ subvolume like this is fine, provided we have a replacement.
Resize
1
|
|