btrfs snapshot management

7,125

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.

Share:
7,125

Related videos on Youtube

bumbling fool
Author by

bumbling fool

Updated on September 17, 2022

Comments

  • bumbling fool
    bumbling fool almost 2 years

    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?

    • Olli
      Olli over 13 years
    • csirac2
      csirac2 about 9 years
      I've started a project called snazzer, which offers btrfs snapshotting, pruning and transport via ssh or local filesystems. It's not quite ready for release but I would love to hear feedback if anybody has time to review it at this early stage. CLI-only at this point.
  • Vladimir Panteleev
    Vladimir Panteleev over 8 years
    The project seems to be abandoned now, no changes in over 4 years.