[Btrfs-users] Thoughts about filesystem undo
Phil Endecott
spam_from_btrfs at chezphil.org
Tue Sep 25 15:45:03 PDT 2007
Dear Btrfs people,
I saw Chris' Btrfs talk at LinuxConf.EU a few weeks ago and have since
been thinking about how I would like to use this great code once you
have done all the hard work :-)
Fine-grain filesystem undo, thanks to cheap snapshots, is what I'm
thinking about. The more I consider it the more useful I believe it
will be; here's a recent example:
# apt-get install libsomething-weird-and-wrong
installing packages: that that and the other
removing conflicting packages: important vital libc oh no oh dear
Woops. I've spent days trying to recover from things like that.
Wouldn't it be great to just "rollback"? But of course what I don't
want to do is to rollback /var/spool/mail, where an important message
arrived in the middle of my disastrous apt-get. I think that if this
works well it could change the way that we interact with our computers
quite significantly; it would remove the need for most "are you sure?"
prompts, and make people less scared of breaking things.
So I was wondering if you have thought about how this could be made to
work, from the user's (or application developer's) viewpoint rather
than in terms of the filesystem implementation. Certainly, more than
just "snapshot create" and "snapshot delete" commands are needed.
One idea is to automatically take a snapshot when each processes
starts, and to keep it until its parent process terminates. This means
that from the command line I can rollback to between any commands in
that shell's history. Perhaps applications that suffer an error could
choose to revert all their changes on termination.
I have various other half-baked ideas, but I'll wait and see if you
have any thoughts to share before continuing.
Regards,
Phil.
More information about the Btrfs-users
mailing list