Re: [linux-lvm] restoring filesystem state using snapshot

From: Cameron Hutchison <camh xdna net>

To: linux-lvm sistina com

Subject: Re: [linux-lvm] restoring filesystem state using snapshot

Date: Fri Jan 9 09:57:02 2004

Once upon a time Ken Fuchs said...
>
> >i want to restore the filesystem state using only the snapshot taken by LVM
> >ie without taking a full backup.
>
> Will copying the contents of the snapshot over the original logical
> volume do what you want? If so, this can be done as follows:
>
> # mount /dev/vg/snapshot /snap
> # mount /dev/vg/original /orig
> # (cd /snap; tar cf - .) | (cd /orig; tar xvf -)
rsync would probably be a better option - it will copy far less and will
remove any files added after the snapshot was taken (if invoked
appropriately). /orig should end up as a replica of /snap.