View Single Post
  #4   (View Single Post)  
Old 7th December 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,131
Default

The smallest atom dump can backup is a filesystem, so in your case
Code:
/dev/ad0s1a (/)
/dev/ad0s1g (/home)
/dev/ad0s1f (/tmp)
/dev/ad0s1d (/usr)
/dev/ad0s1e (/var)
By default dump assumes to be working on a tape drive device. If you want to backup to a file you have to use both the -f and -a options.

You have to watch out that you don't backup the filesystem you backup device is mounted on.
E.g if you are dumping /dev/ad0s1g, your /home directory, don't mount your drive on a subdirectory of /home.
If you backup drive is mounted on "/mnt", then it is ok to dump any other filesystem, except /dev/ad0s1a (/) of course

If you are the only user, you could mount your disk on a directory in /tmp, which you probably don't want to backup anyway.

Assuming your backup drive has been mounted on /tmp/mount you could do something like this
Code:
# dump -0auf /tmp/mnt/myhome_dump0 /dev/ad0s1g
The options
Code:
0                       : level of backup   
a                       : auto-size to bypass tape length stuff
u                       : update dump statistics in /etc/dumpdates
f /tmp/mnt/myhome_dump0 : destination file 
/dev/ad0s1g             : the filesystem to be 'dump'ed
Or you could compress with gzip
Code:
# dump -0auf - /dev/ad0s1g  | gzip >/tmp/mnt/myhome_dump0.gz
Here you specify the destination file with a hyphen: -.
This means standard output, which is piped into gzip for compression.

All this works similar in FreeBSD and OpenBSD. Most system administrators will either go into single user mode, or stop daemons/programs which could generate file output during the dumping process.

With FreeBSD, you don't have to do this, if you the -L option which takes a snapshot of the filesystem and dumps the snapshot.
But I am conservative, I just go into single user mode
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote