Date: Sun, 18 Apr 2010 15:45:42 +0100 From: Chris Rees <utisoft@googlemail.com> To: freebsd-questions <questions@freebsd.org> Cc: jd_bronson@sbcglobal.net Subject: Re: Backing up freebsd to 1 file? Message-ID: <j2wb79ecaef1004180745k50811c8cj982af263918bb24@mail.gmail.com> In-Reply-To: <1271601423.1287.15.camel@localhost> References: <4BCB07C0.8010305@sbcglobal.net> <20100418161015.f20206f0.freebsd@edvax.de> <1271601423.1287.15.camel@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18 April 2010 15:37, Sergio de Almeida Lenzi <lenzi.sergio@gmail.com> wr= ote: > I am very happy with the folowing.... > > > Supose that you have mount ANOTHER device on /mnt.... > > 1) mount /dev/xxxx /mnt > 2) init 1 =A0(this closes all applications and drop into single user) > 3) tar --one-file-system -cvzf /mnt/backup.tar.gz ./ var usr home > 4) umount /mnt > 5) exit (reboot from single user to normal operation) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > on restore....... > supose you install a FBSD minimal from the CD/usb..... > > 1) mount /dev/xxxx /mnt > 2) tar -xpvf /mnt/backup.tar.gz -C / > ........................ > 3) umount /mnt > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dyou have restored your system=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > may be some files (sockets...) are not restored but no problem as > they will be created by the time your system boots on. Nice answer by Sergio, but I personally would use the j option with tar to compress to bzip2; 3) tar --one-file-system -cvjf /mnt/backup.tbz ./ var usr home Though I prefer personally to use dump/restore because: - If you're on UFS, you don't have to single-user the system, just use the L option (live filesystem) - Restore has an awesome 'interactive' mode - See Zwicky [1] I'll send you my dump scripts if you're interested. It's dead easy to use! Chris [1] http://www.coredumps.de/doc/dump/zwicky/testdump.doc.html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?j2wb79ecaef1004180745k50811c8cj982af263918bb24>