Hi all,

I'm using LVM for all the partitions on my main hard drive (boot partition
excepted) for the ability to take "snapshots" of the partitions at a
particular point in time.

Anyway, while I have figured out perfectly how to take snapshots, mount
them, and read/write to/from them, I have yet to find a good way to *revert*
volumes (in particular, my root volume) to the state they were as of the
snapshots.  Currently, what I am doing to "revert" my root volume is:

1. Reboot from a separate volume with the Debian base system installed
2. lvcreate a new volume with the same size as my root volume
3. cp /dev/debian/snapshot /dev/debian/new_volume
4. lvrename /dev/debian/root /dev/debian/something_else
5. lvrename /dev/debian/new_volume /dev/debian/root

This works fine. However, it is - of course - quite tedious, as it requires
copying some 10GB worth of data.  Does anyone know of a better way?
Possibly using rsync?  I may want to do this quite often in the future, as I
plan on testing all sorts of somewhat-hairy things on this system and want
to be able to easily revert to a snapshot.

Tim

Reply via email to