Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Nov 1999 18:45:18 -0700 (MST)
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        damascus@eden.rutgers.edu (Carroll Kong)
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: Will Dump, backup to a file?
Message-ID:  <199911080145.SAA02184@panzer.kdm.org>
In-Reply-To: <4.2.0.58.19991107202551.00c07220@email.eden.rutgers.edu> from Carroll Kong at "Nov 7, 1999 08:30:48 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Carroll Kong wrote...
> 	Hi.  I am using FreeBSD 3.3-Release, and I wanted to know if I can do this
> 
> dump -0 /opt/tmp/varback.dmp /var
> 
> (where /opt/tmp is some other free slice)
> 
> 	The situation is, I have an old celeron machine, and we are getting a new 
> server.  However, we want to move the freebsd setup we have from an ide 
> drive to the new scsi drive we are getting.  We do not have a tape 
> backup.  We just want to copy from one harddrive to another.  So, my 
> original plan was to boot back up with the old ide drive on the new server, 
> either using cp -aR or tar the old file systems into the new drive which we 
> will mount.  Or, just reinstall a fresh freebsd setup on the scsi drive, 
> and copy back the old data.  However, dump seems to be the real answer 
> here, however, everyone seems to talk about how it works on tape drives.  I 
> dont' want to see it wipe out any of my file systems, so I want to make 
> sure this will work.  Even though everything in UNIX is a file, I am not 
> sure if it will work?  Thanks in advance.

What you want is probably:

dump -0f - /var > /opt/tmp/varback.dmp

The reason for using stdout is to disable the tape length calculations.
The -a switch should do the same thing.

You can then restore from the dump image using restore(8).

You can also copy 'live' from one disk to another.  You could do something
like this:

[ fdisk, disklabel, newfs partitions for the new disk ]
[ mount the new root partition as /new ]
dump -0f - / | '(cd /new && restore -rf -)'
[ now mount the new /usr partition as /new/usr ]
dump -0f - /usr | '(cd /new/usr && restore -rf -)'
[ and so on for more filesystems ]

Ken
-- 
Kenneth Merry
ken@kdm.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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