Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

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".


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.
share|improve this answer
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 '11 at 0:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.