Date: Wed, 17 Oct 2001 13:24:17 -0500 From: Mike Meyer <mwm@mired.org> To: Nils Holland <nils@tisys.org> Cc: questions@freebsd.org Subject: Re: System Backup To CD-R Message-ID: <15309.52433.959021.237595@guru.mired.org> In-Reply-To: <8798445@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Nils Holland <nils@tisys.org> types: > So, has anyone experience with backing up a FreeBSD system to CD-R? I figure > that I could do it all by hand - copy as many files as fit on a CD-R, then > take a new one and repeat until all files have been dealt with. This is, > however, a time-consuming task if done by hand. So I think I need a script or > something that does this more or less automatically, so that I only have to > change the CD-Rs. Does anyone know if such a script exists? Or is anyone > using CD-Rs for backup purposes and has some hints for me how it could best > be done? Yup. I do it regularly, using dump & restore, as you pretty much have to use dump & restore on / and /usr. This only works reasonably if your incremental changes during the course of a week are a small fraction of the size of a cd. The downside of dump and restore is that you have to backup up *file systems*. Unless you're going to back up everything, this means you need to put things that you aren't going to back up on separate file systems. /tmp is a good thing not to back up. I also set aside a scratch partition for stuff downloaded or built from the network, and point DISTDIR and WRKDIRPREFIX to that partition in /etc/make.conf. That way, I don't back up the tarballs downloaded for ports, nor do I back up the stuff created in building ports. Full backups are the hard part. You can get dump to partition things up into CD-R sized slices for you. Since I want to mount and read the backups normally, this requires at least enough free space to hold a CD-R's worth of data. You then do something like: # dump 0u -B 710000 -f fs.dump That will dump 695M into fs.dump, then prompt you to change vlumes. You can then burn a cd and test it, then tell dump to proceed. I have a script to burn and test a directory. Dealing with the CDs is the timeconsuming part of this, so if you have a partition with enough spare disk space to dump your largest partition, you can do: # dump 0u -B 710000 -f vol1.dump,vol2.dump,vol3.dump,vol4.dump And dump will automatically go to the next file until it gets to the last one - which is why you always provide one more than you think you'll need. After that, you can reboot and burn and test CDs at your leisure. After that, you run a daily script that creates incrementals. Those should pretty trivially fit on a single CD. However, I recommend buying a cheap hard disk for this. That provides enough space so you can do a full dump and burn CDs later. Then dump incrementals to that disk - through your favorite compression program - with the monday morning backup being everything that's changed since the last full - a weekly - and the others to include everything that's changed since the last weekly. The backup script burns the weeklies to CD, and all the CDs - or copies of them - go offsite. That way, if you lose the hard disk, you've got everything up to the last daily. If you lose the entire office, you've got everything up to the last weekly. For this scheme - fulls, weeklies and dailies - I use levels 0, 4 and 8. When I'm going to do something dangerous during the day, I run a quick level 9. I can also run level 2s and 6s if something strange happens that bloats weekly or dailies temporarily. Of course, this has to be tailored to the amount of data that gets backed up, and how much it changes over the course of the week. In particular, you'll have to do fulls every time the weeklies get to be bigger than a CD. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Q: How do you make the gods laugh? A: Tell them your plans. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15309.52433.959021.237595>