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
March 10, 2011 at 8:34 pm |
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
March 10, 2011 at 8:44 pm |
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.
March 10, 2011 at 8:56 pm |
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?
March 10, 2011 at 10:14 pm |
/srv is a much newer part of FHS than those programs, so they probably haven’t changed due to inertia.
March 10, 2011 at 10:24 pm |
wow that’s awesome
Thanks mvo
March 11, 2011 at 12:05 am |
Databases aren’t the only important things in /var — consider also /var/log and /var/mail.
March 11, 2011 at 3:14 am |
How come that is available in Ubuntu but not in Debian?????????????? WTF
March 11, 2011 at 8:04 am |
Its just very new, there is no reason not to have it in debian, I expect it to be there really soon.
March 11, 2011 at 7:16 am |
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.
September 20, 2011 at 6:53 am |
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
September 20, 2011 at 6:54 am |
sorry the error part didn’t copy
ERROR: cannot snapshot ‘/tmp/apt-btrfs-snapshot-mp-gD3PJM/@’