From owner-freebsd-questions@FreeBSD.ORG Sat May 26 21:12:16 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC5A516A421 for ; Sat, 26 May 2007 21:12:16 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr13.xs4all.nl (smtp-vbr13.xs4all.nl [194.109.24.33]) by mx1.freebsd.org (Postfix) with ESMTP id 7776F13C457 for ; Sat, 26 May 2007 21:12:16 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr13.xs4all.nl (8.13.8/8.13.8) with ESMTP id l4QLC1Ft083046; Sat, 26 May 2007 23:12:02 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 9D9A8B826; Sat, 26 May 2007 23:12:01 +0200 (CEST) Date: Sat, 26 May 2007 23:12:01 +0200 From: Roland Smith To: Svein Halvor Halvorsen Message-ID: <20070526211201.GA40139@slackbox.xs4all.nl> References: <465864F4.7060500@lvor.halvorsen.cc> <20070526180336.GB34660@slackbox.xs4all.nl> <465884E3.5000500@lvor.halvorsen.cc> <20070526194342.GA37130@slackbox.xs4all.nl> <465898D5.7080607@lvor.halvorsen.cc> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <465898D5.7080607@lvor.halvorsen.cc> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.15 (2007-04-06) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: questions@freebsd.org Subject: Re: Restore UFS snapshot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 21:12:16 -0000 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 26, 2007 at 10:30:13PM +0200, Svein Halvor Halvorsen wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Roland Smith wrote: > >>> You can mount the snapshot, and then copy the files back to the origi= nal 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. > >=20 > > Huh?=20 > >=20 > > Suppose you did 'mksnap_ffs /usr /usr/.snap/20070526' > >=20 > > Then all you have to is something like: > >=20 > > # 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 > >=20 > > How much easier could it be? You could easily create a script for this > > as well. >=20 > Let me clarify: It is a lot of work for the computer, for the hdd. You could use rsync instead of tar. That would save time. > (b) Undo all the bit flipping I have done, since I made the snapshot. This is what the procedure above does if you replace the tar commands with rsync. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --AhhlLboLdkugWU4S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFGWKKhEnfvsMMhpyURAnX+AJ9YEmlWDp0x72cpzwEnBP7kreGt4gCggoMY NhOYDNaLIKfd1hI+ivaI3s4= =XfZA -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S--