disaster recover w/tar & find


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers disaster recover w/tar & find
# 1  
Old 11-12-2002
disaster recover w/tar & find

Hi,

I am creating a disaster recovery plan for my Linux 7.2 machine. I have two backups from my current machine.

One created using the command
tar -cvpf /dev/st0 --exclude=/proc --directory / .

and one created with the command
find / /boot /home -mount -path '/proc' -prune -o -print | cpio -ovcB -O /dev/st0

When I restore the "find" version everything works.

When I restore the "tar" version, the machine doesn't boot into Linux at all. It displays "LI" at the bottom, in white letters, and locks up.

The "find" method takes about 7 hours to run and the "tar" method takes 2.5 hours.

Can anyone tell me what is different about these two commands and what they back up, and why the big time difference?


thanks
# 2  
Old 11-12-2002
I'm not sure why one takes so much longer than the other, but I've seen that problem on bootup (hangs at LI).
In that case, you boot manager/area is damaged - in this case, LILO.

To restore, I would recommend building a barebones system, then unpacking your backups onto it. Or you could take a disk image... It may be as easy as "dd if=/dev/hda of=/dev/st0" from a boot disk... Note that it may also be more complicated than that, and the device names would have to be adjusted (I'm assuming you have your entire normal filesystem on one EIDE disk... this is probably not the case).

If you're trying to make the existing backup work, you can unload it to disk, boot off of a disk (CDROM, Floppy, etc) with the root being your newly-restored disk, and execute "/sbin/lilo" to try to repair it...

Hope this helps a little...
# 3  
Old 11-13-2002
thanks livinfree,

I am doing the bare bones system, (on a duplicate machine) and unpacking the backups.

Is there some reason that the boot manager area is not backed up or damaged with the "tar" method as opposed to the "find" method? Both backup methods are done at the init 1 level.
# 4  
Old 11-13-2002
I'm very interested in the original posters question of why find|cpio restores without corruption LILO as does tar (seemingly).

From your post, it would seem that one corrupts (or indirectly influences the corruption or lack of something) of either the Master Boot Record (MBR) or the LILO boot maps.

If we assume that both find|cpio and tar archive and restore the LILO configurations files in the LILO configuration directory, then a logical (but wrong, me thinks) assumption is un-tar corrupts the MBR, and that does not seem possible.

The premise of the question is very interesting and has me contemplating how we could uncover the problem.??.. OR, if there is someother factor that is causing the LILO error unrelated to either find|cpio or tar.
# 5  
Old 11-14-2002
I have found the reason for the big time difference between the two commands. If I increase the block-size parameter on the "find" method it takes about 45 minutes to do the backup.

new command:
find / /boot /home -mount -path '/proc' -prune -o -print | cpio -ovc -O /dev/st0 --block-size=40

per NEO, I am in the process of comparing the LILO configuration files to determine if something is causing problems there.

Thanks for all the advice.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

UNIX : how can I recover a corrupt tar file from a tape?

I've a tape contains a corrupt tar file. I'm using Unix SunOS 5.5.1. So when I run this command : dd if=/dev/rmt/0 of=/tmp/outputfile.tar I get this error message : warning /pci@1f, 0/pci@1/pci@1/sunw, isptwo@4/st@4,0 (sty): Error for command : read Error Level: Fatal Requested... (2 Replies)
Discussion started by: akaderb
2 Replies

2. AIX

AIX & TAR related stuff

This thread is about using tar & other compression utilities on AIX ; 1. Find out which version of tar you are using thanks to bakunin >what $(which tar) /usr/bin/tar: 61 1.14 src/bos/usr/ccs/lib/libc/__threads_init.c, libcthrd, bos53 0 7/11/00 12:04:14 10 ... (21 Replies)
Discussion started by: filosophizer
21 Replies

3. Shell Programming and Scripting

help with tar & zip only last months(say,Sep) files

Need to 1. archive all the files in a directory from the previous month into a tar/gz file, ignoring all already archived 'tar.gz' files 2. Check created .tar.gz file isnt corrupted and has all the required files in it. and then remove the original files. I am using a function to get the... (1 Reply)
Discussion started by: Prev
1 Replies

4. Shell Programming and Scripting

Using Grep & find & while read line in a script

Hello people! I would like to create one script following this stage I have one directory with 100 files File001 File002 ... File100 (This is the format of content of the 100 files) 2012/03/10 12:56:50:221875936 1292800448912 12345 0x00 0x04 0 then I have one... (0 Replies)
Discussion started by: Abv_mx81
0 Replies

5. Shell Programming and Scripting

Find & Replace string in multiple files & folders using perl

find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g' this is simple logic to find and replace in multiple files & folders Hope this helps. Thanks Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies

6. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

7. Solaris

Tar & Tape drive without media

Hi all, I would like to know what would happen if the tape (media) is not placed on the drive and a tar command is executed to backup on the tape. My problem is that tar command hanged for multiple days instead of throwing the error, Is it valid behaviour? I was unable to test the... (4 Replies)
Discussion started by: jmsathish
4 Replies

8. UNIX for Dummies Questions & Answers

tar & Grep together

Hi, I've got dozens of tar's with two files in each one, live_access_log & live_error_log (one tar for each day, backups). The probelm is i need to match a pattern in all of the archive_access_log files and output the line to a seperate file (All_access.log). I.e. I need to get details... (21 Replies)
Discussion started by: tom123
21 Replies

9. Shell Programming and Scripting

Find & tar execution problem

I'm trying to set up a stanard sh script that will find all the files that have been changed within the last day and then tar them up. I think the command line should be something like : find /home/bob -atime +0 -exec \ tar cvf /home/bob/files.tar {}\; Help please ... Thanx (3 Replies)
Discussion started by: ianf
3 Replies
Login or Register to Ask a Question