Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 May 2007 22:30:13 +0200
From:      Svein Halvor Halvorsen <svein.h@lvor.halvorsen.cc>
To:        Roland Smith <rsmith@xs4all.nl>
Cc:        questions@freebsd.org
Subject:   Re: Restore UFS snapshot
Message-ID:  <465898D5.7080607@lvor.halvorsen.cc>
In-Reply-To: <20070526194342.GA37130@slackbox.xs4all.nl>
References:  <465864F4.7060500@lvor.halvorsen.cc> <20070526180336.GB34660@slackbox.xs4all.nl> <465884E3.5000500@lvor.halvorsen.cc> <20070526194342.GA37130@slackbox.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Roland Smith wrote:
>>> You can mount the snapshot, and then copy the files back to the original fs.
>>> Note that cp can preserve flags, but not ACLs AFAIK.
>> Yes, I know that this is possible. However, it's a lot of work.
> 
> Huh? 
> 
> Suppose you did 'mksnap_ffs /usr /usr/.snap/20070526'
> 
> Then all you have to is something like:
> 
> # mdconfig -a -t vnode -f /usr/.snap/20070526 -u 0
> # mount /dev/md0 /mnt/snapshot
> # cd /usr
> # tar cf - /mnt/snapshot/* |tar xpf -
> # umount /mnt/snapshot
> # mdconfig -d -u 0
> 
> How much easier could it be? You could easily create a script for this
> as well.

Let me clarify: It is a lot of work for the computer, for the hdd.


>> There should be some straightforward way of rolling back to a
>> snapshot, since the files and all the file system structure are
>> already there. Also, there might not be room on the disk for it.
> 
> Snapshots take up room as well.

But the snapshot is already made.

Again, let me clarify:


At some point in time, my file system is filled with random* bits. I
then make a snapshot.

- From now on, all bits** that I flip will be take up an extra bit of
space. Then, after changing lots of bits, I decide I wanted the old
data back, as the file system was before I started to flip bits.

Now, I could either:

(a) Flip alot more bits, by making copies of the snapshotted bits
over some free area of the disk, or

(b) Undo all the bit flipping I have done, since I made the snapshot.


In (a) I will have two copies of all the bits that has changed since
the original snapshot, while in (b) I am back to where i were before
the snapshot.

Does this make any sense? Have I not understood this correctly?



	Best regards,
	Svein Halvor



*) well, not random, but they might just as well be for the sake of
the argument
**) actually not bits either, but blocks or whatever.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
Comment: mailto:pgpkey@svein.halvorsen.cc to get my PGP-key

iD8DBQFGWJjUhQg3vZGYu0ARAofgAJ9QS1pPyYEmeQ8TkgYR7HbptZ014QCgqmkR
1dr8wcQV0qhR9KH7VlG/4Q0=
=ssrQ
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?465898D5.7080607>