apt-btrfs-snapshot

One of the new features in natty is the “apt-btrfs-snapshot” package. Its for people who use a btrfs install of natty. Once installed 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. Its build on top of the btfs snapshot feature and will work out of the box with the filesystem layout that a natty alpha3 btrfs install creates.

Advertisement

11 Responses to “apt-btrfs-snapshot”

  1. Ante Says:

    Sounds cool, but I would think about adding /var to exception list. Imagine you have a database on the same machine. You wouldn’t want to roll that back :)

  2. Chris Says:

    Things like databases really belong under /srv, and probably should be moved if not there already, but that does bring up the point that /usr/local and /opt should also be excluded, pretty much anywhere that the regular packaging system shouldn’t be touching.

  3. Oli Says:

    Perhaps that suggests that Apache (et al), MySQL (et al) don’t use sane defaults. They all use /var/. If you’re saying that’s incorrect, why do they default there?

  4. Chris Says:

    /srv is a much newer part of FHS than those programs, so they probably haven’t changed due to inertia.

  5. Ahmed Kamal Says:

    wow that’s awesome :) Thanks mvo

  6. Marius Gedminas Says:

    Databases aren’t the only important things in /var — consider also /var/log and /var/mail.

  7. foo Says:

    How come that is available in Ubuntu but not in Debian?????????????? WTF

  8. Ante Says:

    Of course, /var was just an example. Excluding every directory that packages don’t touch should be by default (/root, /home/ /usr/local, /srv…). I do agree that /srv should be a place for services’ content. But /var is much more than; at least some parts of it need to be excluded.
    There’s no easy way to roll back all the changes a deb package makes (think or preinst and postinst scripts), so as far as I can tell, this does look like the best approach.

  9. Kat Amsterdam Says:

    it’s very broken. When using Ubuntu update-manager it returns the error

    installArchives() failed: Create a snapshot of ‘/tmp/apt-btrfs-snapshot-mp-q1iAGQ/@’ in ‘/tmp/apt-btrfs-snapshot-mp-q1iAGQ/@apt-snapshot-2011-09-20_08:51:37′

    Create a snapshot of ‘/tmp/apt-btrfs-snapshot-mp-baDHhK/@’ in ‘/tmp/apt-btrfs-snapshot-mp-baDHhK/@apt-snapshot-2011-09-20_08:51:37/@’

    Create a snapshot of ‘/tmp/apt-btrfs-snapshot-mp-0WH8Ka/@’ in ‘/tmp/apt-btrfs-snapshot-mp-0WH8Ka/@apt-snapshot-2011-09-20_08:51:37/@’

    Also there is no man page for it, to tell what options are available.

    I’ve reported this bug at
    https://bugs.launchpad.net/bugs/853849

  10. Kat Amsterdam Says:

    sorry the error part didn’t copy

    ERROR: cannot snapshot ‘/tmp/apt-btrfs-snapshot-mp-gD3PJM/@’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.