7

I read on the planet that apt-btrfs-snapshot would be available for Natty. The brief description of what it does sounds very nice:

it will automatically create filesystem snapshot (of everything but /home) when apt installs/removes/upgrades. With the apt-btrfs-snapshot cli app its easy to list/remove/rollback the snapshots

But before I convert my entire life to btrfs for the sole purpose of gaining a built-in backup system, can anybody tell me how btrfs's snapshots work. To my layman's brain, it sounds like this would eat a devastating amount of disk space if you're taking snapshots every time you install or upgrade something (I do this more than once a day).

I assume the system is smarter than I'm allowing it but I really don't know. How do the snapshots work?

1 Answer 1

2

I don't know apt-btrfs-snapshot, but from what I read rapidly in the code, it simply use the btrfs snapshot feature before apt's actions.

btrfs uses a lot of B-trees to hold data. Duplication is kept to minimum (not even using hardlink, but copy-on-write). Read: "it will use as much more-memory that you delete data outside /home".

EDIT:

After reading the code, apt-btrfs-snapshot have some problems. For example:

  • it makes big assumptions: your btrfs must have specific subvolume's name (your root subvolume must be named "@")
  • if your /home and /var/lib are on the same subvolume as your root /, they will also be snapshotted.
1
  • 4
    When I installed using btrfs, these things were setup by default - home was mounted on a subvolume, and root had the special name. It's true that if you transitioned an existing ext4 install to btrfs you would not necessarily have everything nicely set up for this.
    – RAOF
    Oct 5, 2011 at 0:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .