btrfs snapshot management
1) Is there a gui or curses tool that allows you to view/manage btrfs subvols/snapshots?
2) Is there a utility or already made script that would automatically create and delete snapshots daily/weekly? I'm aware that I could probably use a simple sh via cron but is there anything more elaborate that already exists?
Solution 1:
1) I have not seen any GUI or curses tool.
2) There are a couple of existing scripts out there. I haven't tried them, but they look interesting:
SnapBtr: https://btrfs.wiki.kernel.org/index.php/SnapBtr
btrfs-snap: http://blog.patshead.com/2010/11/tweak-btrfs-snap-for-more-frequent-snapshots.html
A related btrfs development is the announcement that Natty (11.04) will feature automatic btrfs rollback for packages. I.e., for btrfs installations it will automatically snapshot before any apt install/upgrade/remove operation: http://mvogt.wordpress.com/2011/03/10/apt-btrfs-snapshot/
Solution 2:
I found timeshift to work far better than snapper-GUI, except while in SUSE, where snapper rocks! https://github.com/teejee2008/timeshift
Solution 3:
snapper is a command-line tool designed to manage btrfs snapshots, and can be used with snapper-gui.
snapper
is available for ubuntu. It can be configured to take time-based snapshots, reboot snapshots and even take snapshots every time apt
is called. In 18.04, snapshot triggered by boot or apt
are enable by default (after configuring snapshots for /
.
If you plan to use snapper (or any other snapshot tool), I would recommend you to make a separate volume (or partition) for:
-
/tmp
: snapshots will be a pure waste of space. -
/var/log
: so you can preserve your logs even after a restoration.
This tool : grub-btrfs, can be used to generate bootable grub entries for your snapshots.