View Single Post
  #1   (View Single Post)  
Old 11th July 2008
mwotsch mwotsch is offline
New User
 
Join Date: Jul 2008
Posts: 3
Default backing up an entire system

Hello!

We run a production server that is of course rather important. The files on it (with the exception of databases, which are regularly backed up, and log files) don't change really. There are of course code changes, but those are pulled in from a subversion server. Nonetheless, I would like to back up the entire machine. It runs FreeBsd 6.2, and has apache, tomcat as well as postgresql on it.

A quick
Code:
#df -h
reveals
Code:
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad0s1a     70G    6.3G     58G    10%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad2s1d     72G    8.2G     58G    12%    /opt
I read that in order to backup a live system you have to use the -L option when using dump. This should take a snapshot of the filesystem and then dump that to avoid missing changes while dump is executed.

After investigating for a while I came up with
Code:
#dump -0u -h 0 -C 16 -L -f path/to/file/to/dump/to
where -0 is for full backup, -u for update of the dumpdates file, -h 0 for honoring no nodump flags that could be set, -C 16 for cache size of 16MB, -L for live system, -f for the output file.

This makes sense to me. Also, I verified that the directory /.snap exists, so that a snapshot can be taken.

Questions are as follows:
1) What do I need to specify to be backed up? Does no argument need to be provided to backup the entire machine? Does "/" suffice? Do I need to specify the device name as in "/dev/ad0s1a"?

2) When the backup is written, will it be backed up as well and then recursively repeatedly backed up? How can I avoid that if I don't have an external device to write to? Does the option -L take care of that?

Thanks in advance,
mwotsch
Reply With Quote