|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
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 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 After investigating for a while I came up with Code:
#dump -0u -h 0 -C 16 -L -f path/to/file/to/dump/to 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 |
|
||||
Quote:
Quote:
Quote:
if backup storage space is an issue, try "-f - | bzip2 > fs.dump.bz2" instead of "-f filename" to compress on-the-fly. |
|
|||
jbhappy,
Thanks for the response. I checked and the contents of /etc/fstab are as follows: Code:
# Device Mountpoint FStype Options Dump Pass# /dev/ad0s1b none swap sw 0 0 /dev/ad0s1a / ufs rw 1 1 /dev/ad2s1d /opt ufs rw 2 2 So, am I correct in the assumption that the command Code:
/sbin/dump -0u -f /dev/nsa0 /usr/src Would the following command then do the job? Code:
#dump -0u -h 0 -C 16 -L -f /opt/path/to/backupfile / Code:
#dump -0u -h 0 -C 16 -L -f /path/to/backupfile /opt Thanks for your help. mwotsch |
|
|||
Thanks killasmurf,
Why do I need -a if dumping to a file? The man page does not specify that. Will it otherwise create a too large file? So I am beginning to understand this a bit better. I was originally under the assumption that I could back up the system with one simple command but it seems that I need one for Code:
/dev/ad0s1a Code:
/dev/ad2s1d |
|
||||
if you won't include -a flat, dmup will calculate some tabe blocks or something, and write only as much as these can be filles (whic is very small), and then ask to dumb question... i don't remember what exactly....
Code:
-a ``auto-size''. Bypass all tape length considerations, and enforce writing until an end-of-media indication is returned. This fits best for most modern tape drives. Use of this option is particularly recommended when appending to an existing tape, or using a tape drive with hardware compression (where you can never be sure about the compression ratio). Whit -a dump will write as long as there is space on disk. or dump is ended..... and there won't be problems..... I did it many times.... to restore dump you need to format slice (newfs /dev/slice or newfs -U /dev/slice), then mount it, ch into mount point, and restore -rf /path/to/dumpfile or bzcat /pat/to/dumpfile.bz2 | restore -rf - |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cloning an entire drive? | spiderpig | OpenBSD General | 12 | 14th August 2019 09:49 AM |
How can I move this system? | Randux | FreeBSD Installation and Upgrading | 7 | 3rd February 2009 09:01 AM |
system resources | gosha | OpenBSD General | 7 | 30th January 2009 12:01 AM |
Which file system use to share data on Bsd system? | aleunix | Other BSD and UNIX/UNIX-like | 2 | 1st June 2008 04:14 PM |
backing up via 'dump'... | Damien787 | FreeBSD General | 5 | 8th May 2008 01:05 AM |