Date: Tue, 24 Oct 2006 15:01:37 -0500 From: Eric <heli@mikestammer.com> To: James Smallacombe <james@pil.net> Cc: freebsd-questions@freebsd.org Subject: Re: Copying binaries to new server Message-ID: <453E7121.9090105@mikestammer.com> In-Reply-To: <Pine.BSF.4.44.0610241555010.1851-100000@richard2.pil.net> References: <Pine.BSF.4.44.0610241555010.1851-100000@richard2.pil.net>
next in thread | previous in thread | raw e-mail | index | archive | help
James Smallacombe wrote:
> On Tue, 24 Oct 2006, Jerry McAllister wrote:
>> True, but I think the poster was suggesting that dump/restore is
>> a better way than using tar.
>
> I'm not as familiar with BSD dump...does it compress well? Also, what's this?
>
> su-2.05b# dump -0L -f ns1.usr.dump /usr
> DUMP: Date of this level 0 dump: Tue Oct 24 15:52:01 2006
> DUMP: Date of last level 0 dump: the epoch
> DUMP: Dumping snapshot of /dev/da0s1d (/usr) to ns1.usr.dump
> DUMP: mapping (Pass I) [regular files]
> DUMP: mapping (Pass II) [directories]
> DUMP: estimated 3077070 tape blocks on 79.03 tape(s).
> DUMP: dumping (Pass III) [directories]
> DUMP: Closing ns1.usr.dump
> DUMP: Change Volumes: Mount volume #2
> DUMP: Is the new volume mounted and ready to go?: ("yes" or "no") yes
> DUMP: Volume 2 begins with blocks from inode 149561
> DUMP: Closing ns1.usr.dump
> DUMP: Change Volumes: Mount volume #3
> DUMP: Is the new volume mounted and ready to go?: ("yes" or "no")
>
> What volume? The one I'm dumping? If so, why does it keep asking whether
> it's mounted? What are all these different volume numbers? I just want to
> dump /usr to one file, compressing and preserving permissions and symlinks as
> much as possible, so I can restore it to a new server.
>
i have never seen the volume messages when i backup.
this is how i do it:
Take a dump
dump -0uanLf - /var | bzip2 | dd of=/some/path/dump-var-level0.bz2
dump -0uanLf - / | bzip2 | dd of=/some/path/dump-root-level0.bz2
dump -0uanLf - /usr | bzip2 | dd of=/some/path/dump-usr-level0.bz2
Restore a dump
To Restore Interactively
* First bunzip, make sure you have disk space.
* restore -i -f filename.dump0
* or bzcat filename.dump0.bz2 | restore -i -f - without bunziping
first. By the way bzcat filename.dump0.bz2 | ssh computer.bei$
* Navigage using cd, ls, etc. Use the verbose command to make
things more verbose.
* use add to add to list of stuff to extract. Will extract in CWD.
* use delete to remove from list of stuff to extract.
* When ready use the extract command to restore.
Should look something like the following:
restore > extract
Extract requested files
You have not read any tapes yet.
If you are extracting just a few files, start with the last volume
and work towards the first; restore can quickly skip tapes that
have no further files to extract. Otherwise, begin with volume 1.
Specify next volume #: 1
Mount tape volume 1
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: filename.dump0)
extract file ./foobar/public_html/somefile.html
Add links
Set directory mode, owner, and times.
set owner/mode for '.'? [yn] n
restore > quit
To Restore Entire Disk
* Plug in fresh drive
* /stand/sysinstall
* fdisk, add bootloader, disklabel
* Mount new drive somewhere, i.e. /mnt-root
* Mount backups
* cd /mnt-root; bzcat /backups/server/dump-root-level0.bz2 |
restore -f -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?453E7121.9090105>
