Making Backups - 4 questions in regard to dump/restore/cdrecord
I am trying to devise a backup/restore mechanism that allows me to easily backup and restore the system root / to/from rewriteable CDs. I was initially fiddling around with tar, but could never restore a tar archive such that the links after the restore were correct . I try now the dump/restore utility and this looks a bit more promising. I use the following procedure for the dumps: 1. dump the system root into 650MB files using the command dump -0 -f /workspace/sysdisk.dmp. -B 665600 -M -z /dev/hda3 The z option of dump compresses nicely, so that a 3GB root partition usually fits onto 2 files / CDs. 2. I omit the step of converting the dump file into a iso9660 file system and burn the dump file directly using cdrecord -v speed=8 dev=3,0 fs=16m -dao -eject /workspace/sysdisk.dmp.nnn -data For the restore I do the following: 1. mke2fs /dev/hda6 2. mount /dev/hda6 /mnt 3. cd /mnt 4. restore rfv /dev/hdb It takes about 12 - 15 minutes to restore a 3GB system root, which is fast enough for my needs. Unlike after a restore from a tar archive, the links are now correct. But every file that spans two CD volumes is missing. The messages I get during the restore operation are: Missing blocks at end of <./path/missingfilename>, assuming hole resync restore skipped n blocks checkpointing the restore expected next file 635951, got 0 <./path/missingfilename> not found on tape This must have something to do with the way I burn the CD's. When I use the dump files without burning them onto the CDs, it works well. Question 1: Are there any options to stop dump spanning files over volume boundaries or are there any options for cdrecord I could use so that all files can be restored? Question 2: Should the root file system be corrupted, then I have to boot a rescue system via floppy or CDROM. Where does restore come from? Is ist sufficient to keep a copy of restore on a separate partition which I can mount? If so, what is the procedure to guarantee that this separate restore is compatible with the dump and also with the runtime libraries provided with the rescue system? i.e. booting the rescue system with the CDs that came with SuSE 7.1 don't run a SuSE 7.3 restore. Question 3: I intend to use the above procedure also to 'clone' systems, i.e. create a system on a new machine by restoring from the CD's, then re-configure the network related information only. Are there any issues with that, provided the machines are of the same type, lets say all intels or alphas? Question 4: Is there still an easier way of doing backups/restores and / or cloning systems without spending too much money on fast tape drives or other equipment? Thanks for your help and suggestions. Peter Sutter
Peter, The reason you are loosing some of the data at the end of the cd is because of the rockridge/juliet filesystem that you have to have for a cd. You should seperate the files at 630 meg instead of the 650, or use 700 meg cds. As for your second questions, I use SuSE's live cd option when I need to do this. They have both dump and restore available and is very convenient for restoring lost partitions without a working system. For your third question, I do this all the time and it works great. If you weren't able to do this I don't think that most IT shops would do anything else. The answer to question 4 depends on what you are looking for. We have enough machines in the office that it was worth getting a NAS (Network Attached Storage) system just for backups. Although that will probably be out of your price range you could build one out of a spare computer and some scsi drives pretty cheap. Also I created a floopy disk distro that had the necessary information for backup and restore from a network so I could backup or windows desktops. I found that this was more customizable than some of the other backup options that I had seen around and had demonstrated to me. This does not work for servers, but I have automated systems on the servers that back themselves up. Austin Morgan On Fri, Feb 15, 2002 at 12:43:18PM +0800, Peter Sutter wrote:
I am trying to devise a backup/restore mechanism that allows me to easily backup and restore the system root / to/from rewriteable CDs. I was initially fiddling around with tar, but could never restore a tar archive such that the links after the restore were correct . <snip...> Question 1: Are there any options to stop dump spanning files over volume boundaries or are there any options for cdrecord I could use so that all files can be restored?
Question 2: Should the root file system be corrupted, then I have to boot a rescue system via floppy or CDROM. Where does restore come from? Is ist sufficient to keep a copy of restore on a separate partition which I can mount? If so, what is the procedure to guarantee that this separate restore is compatible with the dump and also with the runtime libraries provided with the rescue system? i.e. booting the rescue system with the CDs that came with SuSE 7.1 don't run a SuSE 7.3 restore.
Question 3: I intend to use the above procedure also to 'clone' systems, i.e. create a system on a new machine by restoring from the CD's, then re-configure the network related information only. Are there any issues with that, provided the machines are of the same type, lets say all intels or alphas?
Question 4: Is there still an easier way of doing backups/restores and / or cloning systems without spending too much money on fast tape drives or other equipment?
Thanks for your help and suggestions.
Peter Sutter
__ __ ____ ____ | \/ |/ ___/ ___| Austin Morgan | |\/| | | \___ \ Morgan Computer Services | | | | |___ ___) | 501-857-1189 |_| |_|\____|____/ www.morgancomputers.net
On Fri, 15 Feb 2002 12:43:18 +0800 Peter Sutter <sutterp@sopac.com.au> wrote:
2. I omit the step of converting the dump file into a iso9660 file system and burn the dump file directly using cdrecord -v speed=8 dev=3,0 fs=16m -dao -eject /workspace/sysdisk.dmp.nnn -data
For the restore I do the following:
1. mke2fs /dev/hda6 2. mount /dev/hda6 /mnt 3. cd /mnt 4. restore rfv /dev/hdb
This is a very nice technique, I didn't know you could do that. Is there anything special to watch out for when you do this? I quess that the data on the cd is not retreivable except as a whole file, you can't read individual files? -- $|=1;while(1){print pack("h*",'75861647f302d4560275f6272797f3');sleep(1); for(1..16){for(8,32,8,7){print chr($_);}select(undef,undef,undef,.05);}}
On Fri, 15 Feb 2002 12:43:18 +0800 Peter Sutter <sutterp@sopac.com.au> wrote:
Question 4: Is there still an easier way of doing backups/restores and / or cloning systems without spending too much money on fast tape drives or other equipment?
I have been using 2 perl scripts which do something similar. One, is "cddump", which dumps everything to cd's, but it does it with an iso image. This has the advantage of being able to retreive individual files from the backup. Furthermore, it dosn't require "dump and restore" ; which allows me to use it with reiserfs. And it does "incremental" backups. The second is "mkcdrec". This one works will back up your entire filesystem to cd, AND make a custom bootable 1rst cd. This is great because you can boot an "empty" system, and just copy everything right into it. It also works with reiserfs. Both of these can be found at http://freshmeat.net and enter the names in the searchbox. -- $|=1;while(1){print pack("h*",'75861647f302d4560275f6272797f3');sleep(1); for(1..16){for(8,32,8,7){print chr($_);}select(undef,undef,undef,.05);}}
participants (3)
-
Austin Morgan
-
Peter Sutter
-
zentara