proper use of dump to backup a 5.3 box
Jerry McAllister
jerrymc at clunix.cl.msu.edu
Tue May 10 14:28:07 PDT 2005
>
> This is a follow up to a question I posted not long ago about the best way
> to do a real, complete backup of a freebsd 5.3 box I'm using at home. I
> was looking at several options to do a complete backup so I could recover
> my server (this is used at home for personal and development purposes) in
> case of a hard drive failure or whatever. Originally I was leaning towards
> rsync'ing dumps to another older freebsd box I have at home but I just
> decided to put a 120 gig Western Digital USB drive on the server and backup
> to that instead of trying to do it over the network.
>
> So I have this FAT32 120 gig drive connected to my P4 FreeBSD box that has
> a 40 gig drive and it works great and everything. I created a
> /mnt/usbdrive directory for this drive and it's mounted successfully. In
> the /mnt/usbdrive directory I have two
> subdirectories: /mnt/usbdrive/backups and /mnt/usbdrive/dumps. I am using
> the .../backups directory to do a daily backup of selected directories from
> the P4 box and I want to put my dumps from the in the .../dumps
> directory. I read the man page for dump but I'm still a little unsure of
> the proper way to use the command. Can someone suggest the best way to
> actually execute the dump? (what flags and options, etc). Sorry if this is
> n00bish I just want to do this right the first time. I think this is the
> syntax I should use the first time:
>
> # dump -0u -f /mnt/usbdrive/dumps /
Almost, but that would attempt to write the dump to a file called dumps
in the /mnt/usbdrive/ directory. Also, you want the the -a switch when
dumping to a file so it doesn't try to calculate media (eg tape) size
and ask for second and third tapes. So, something more like
dump 0auf /mnt/usbdrive/dumps/rootdump.20050510 /
might be what you want. That would get you a dump of the whole root
filesystem. If you have another file system such as /usr then a second
part like
dump 0auf /mnt/usbdrive/dumps/usrdump.20050510 /usr
should be done, etc.
>
> Will this dump the entire file system to the usbdrive? I want to do a dump
> once a month, what would the proper syntax be for doing an incremental dump?
If you are doing dumps once per month, don't bother with incremental dumps.
Do a full (level 0) dump each time. Keep three and throw away any older.
To do a complete restore of the root file system, such as at a disk failure,
you will need to boot from some other media. The fixit CD is a good
choice. Download the CD 2 and keep it around somewhere safe for that
eventuality.
////jerry
>
> Steve
>
More information about the freebsd-questions
mailing list