On Sat, Feb 22, 2003 at 03:54:04PM +0100, Dick Hoogendijk wrote:
> I want to make a *full* backup of my fbsd-4.7 to a (remote) HD on my
> local network.
> Should I share the (remote) directory through NFS or an alternate way.
> And most important: what program do I use. The remote is an ext3 linux
> drive.
> Can anyone point me in the right (syntax) direction?
> Should I use tar? Or what?
> In future I want to be able to do a full restore to a new (and much
> larger) harddrive ;-))

There's two parts to this:  

    What program should you use to generate images of your file

    How do you save the data onto your remote machine?

The first question is easy enough to answer.  Any sort of backup
software will do what you want, so long as it can write it's output to
stdout.  dump(8) will give you the most faithful recreation of your
filesystem on the new drive, but tar(1) will work fine if your
filesystem just contains regular files, directories and links.  Use
whichever suits you best.  If you use dump(8) (and probably if you use
tar(1)), you'll have to backup each partition on the disk in turn,
rather than trying to do the whole disk in one shot.

The trick is in the answer to the second question.  Use ssh to let you
write the backup to the remote system.  Just run your backup command
of choice and direct the to stdout, which you then pipe into ssh(1):

    # dump -0f - /usr | ssh linuxbox "cat > /foo/fbsd-usr.dump"


    # cd /home ; tar -jcvlf - . | ssh linuxbox "cat > /foo/fbsd-home.tar.bz2"

Doing the restore is much the same thing in reverse:

    # cd /usr ; ssh linuxbox "cat /foo/fbsd-usr.dump" | restore -rf -


    # cd /home ; ssh linuxbox "cat /foo/fbsd-home.tar.bz2" | tar -jxpvf - 

Nb.  You might think from reading the appropriate man pages that you
could dump directly to a remote file or write a tar file onto a remote
machine by using a construction like:

    # dump -0f linuxbox:/foo/root-fbsd.dump /


    # tar -jcvf linuxbox:/foo/root-fbsd.tar.bz2 /

This is certainly possible, but it requires use of the rmt(8) program
via rexec(3) or rcmd(3) -- or in other words, rsh(1).  That's best
avoided unless you're very sure you can deal with the security



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to