LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Questions about Tape Backup for Sys Admins (https://www.linuxquestions.org/questions/linux-newbie-8/questions-about-tape-backup-for-sys-admins-662799/)

davidstvz 08-15-2008 04:48 PM

Here are the details of the 4 modes available:

mode1 blocksize=0 density=0x51 compression=1 # DLT-V4 density, compression on
mode2 blocksize=0 density=0x51 compression=0 # DLT-V4 density, compression off
mode3 blocksize=0 density=0x50 compression=1 # VS160 density, compression on
mode4 blocksize=0 density=0x40 compression=1 # VS80 density, compression on

The unit is a Quantum DLT-V4 and the tapes are HP DLT Tape VS1 (160 GB with 2:1 compression).

I guess I should use mode 1 or mode 3. Not sure.

When I tar the data, should I also zip or rely on the tape compression?

davidstvz 08-15-2008 05:52 PM

OK, mode 1 is what I need for sure, or mode 2 if I want to disable tape compression.

I went ahead and started the backup *crosses fingers*

Will users notice a serious drop in performance as the tar program reads every single file on the server? CPU usage looks minor, but I'm worried about disk access (I guess that's a good reason to do it during low usage time).

I decided I'm not worried if a few files get corrupted. I think it's reasonably likely that none will anyway. Each file (unless it happens to be very big) would be written to the tape very quickly, so it's not *too* likely that the file will be in the process of being modified when the tar program picks it up (unless the file is modified very frequently).

davidstvz 08-15-2008 07:09 PM

I think I'm getting the hang of this. The big server needs two tapes. I think the data will fit on the tapes using the configuration below. I test compressed a 100 MB of mail and it was neatly cut in half so I know it will all fit. Same with the second tape.

Any reason the following scripts wouldn't work? Any suggestions to improve them?

Code:

#!/bin/csh

mt -f /dev/nsa0 rewind

tar cvzf /dev/nsa0 /dev      #individual partitions
tar cvzf /dev/nsa0 /local
tar cvzf /dev/nsa0 /mail
tar cvzf /dev/nsa0 /scratch
tar cvzf /dev/nsa0 /soft
tar cvzf /dev/nsa0 /tmp
tar cvzf /dev/nsa0 /usr
tar cvzf /dev/nsa0 /var
tar cvzf /dev/nsa0 /u1

tar cvzf /dev/nsa0 /1* #all files and folders on root partition
tar cvzf /dev/nsa0 /2*
tar cvzf /dev/nsa0 /3*
tar cvzf /dev/nsa0 /5*
tar cvzf /dev/nsa0 /6*
tar cvzf /dev/nsa0 /7*
tar cvzf /dev/nsa0 /8*
tar cvzf /dev/nsa0 /A
tar cvzf /dev/nsa0 /C*
tar cvzf /dev/nsa0 /b*
tar cvzf /dev/nsa0 /c* #does it matter if I pick cdrom?
tar cvzf /dev/nsa0 /d* #does it matter if I pick up dev?
tar cvzf /dev/nsa0 /e*
tar cvzf /dev/nsa0 /h*
tar cvzf /dev/nsa0 /i*
tar cvzf /dev/nsa0 /k*
tar cvzf /dev/nsa0 /li*
tar cvzf /dev/nsa0 /lp*
tar cvzf /dev/nsa0 /mnt #does it matter if I pick up mnt?
tar cvzf /dev/nsa0 /mo*
tar cvzf /dev/nsa0 /n*
tar cvzf /dev/nsa0 /p*
tar cvzf /dev/nsa0 /r*
tar cvzf /dev/nsa0 /sbin
tar cvzf /dev/nsa0 /stand
tar cvzf /dev/nsa0 /sy*
tar cvzf /dev/nsa0 /tempmail
tar cvzf /dev/nsa0 /usbd.corer

mt -f /dev/nsa0 rewind

AND:

Code:

#!/bin/csh
mt -f /dev/nsa0 rewind
tar cvzf /dev/nsa0 /u2
tar cvzf /dev/nsa0 /u4
mt -f /dev/nsa0 rewind


davidstvz 08-15-2008 07:57 PM

OK, I ran a test script:


Code:

#!/bin/csh
mt -f /dev/nsa0 rewind
tar cvzf /dev/nsa0 /root/z/dir1
tar cvzf /dev/nsa0 /root/z/dir2
tar cvzf /dev/nsa0 /root/z/dir3
mt -f /dev/nsa0 rewind


Then I attempted to check the tables to verify that everything was alright, but I got errors:

Code:

srv# tar tvzf /dev/nsa0
gzip: stdin: decompression OK, trailing garbage ignored
drwxr-xr-x root/wheel        0 Aug 15 19:38 2008 root/z/dir1/
-rw-r--r-- root/wheel        0 Aug 15 19:38 2008 root/z/dir1/filez1
-rw-r--r-- root/wheel        0 Aug 15 19:38 2008 root/z/dir1/filze2
-rw-r--r-- root/wheel        0 Aug 15 19:38 2008 root/z/dir1/filze3
tar: Child returned status 2
tar: Error exit delayed from previous errors

srv# tar tvzf /dev/nsa0
drwxr-xr-x root/wheel        0 Aug 15 19:38 2008 root/z/dir2/
-rw-r--r-- root/wheel        0 Aug 15 19:38 2008 root/z/dir2/filez4

gzip: stdin: decompression OK, trailing garbage ignored
-rw-r--r-- root/wheel        0 Aug 15 19:38 2008 root/z/dir2/filez5
-rw-r--r-- root/wheel        0 Aug 15 19:38 2008 root/z/dir2/filez6
tar: Child returned status 2
tar: Error exit delayed from previous errors

srv# tar tvzf /dev/nsa0
drwxr-xr-x root/wheel        0 Aug 15 19:38 2008 root/z/dir3/

gzip: stdin: decompression OK, trailing garbage ignored
-rw-r--r-- root/wheel        0 Aug 15 19:38 2008 root/z/dir3/filez7
-rw-r--r-- root/wheel        0 Aug 15 19:38 2008 root/z/dir3/filez8
-rw-r--r-- root/wheel        0 Aug 15 19:38 2008 root/z/dir3/file9
tar: Child returned status 2
tar: Error exit delayed from previous errors

I added a space before each command, but the other spaces were in the output.

davidstvz 08-15-2008 08:06 PM

err..

Maybe running ...

tar cvf /dev/rst12 /

... on the other server wasn't such a good idea. This /proc/ directory is causing all kinds of trouble and after looking up info about it... it's probably a bad idea to include it.

Is there any way to tell the system to tar / but skip /proc ? If so, is there anything else I should skip? Is this going to ruin the backup (it's giving a lot of errors (arg list too long, is not a file, file changed size, invalid argument) although it keeps on going).

It's also seriously degrading system performance although no one is using this system but me at the moment thankfully.

EDIT:

Well, it made it through finally. I'm coming to work tomorrow to back up the other server if I can get some good intel from you guys. Thanks :) Otherwise... it might have to wait until monday night though things are going to get busier and busier ...

trickykid 08-16-2008 08:44 AM

Yeah, don't backup /proc or /dev, they're really pseudo type filesystems, they don't really exist when you turn the machine off and created when the machine is turned on.

I also usually exclude /tmp and some of /var where I don't need to backup logs as I usually have a centralized loghost anyways.

And if you don't have a lot of customized applications in /usr, you can usually omit that as well since you can do bare metal recoveries by installing the base OS first, then applying the backed up data, etc.

davidstvz 08-16-2008 09:22 AM

Quote:

Originally Posted by trickykid (Post 3249621)
Yeah, don't backup /proc or /dev, they're really pseudo type filesystems, they don't really exist when you turn the machine off and created when the machine is turned on.

I also usually exclude /tmp and some of /var where I don't need to backup logs as I usually have a centralized loghost anyways.

And if you don't have a lot of customized applications in /usr, you can usually omit that as well since you can do bare metal recoveries by installing the base OS first, then applying the backed up data, etc.

On one of the systems I'm using, the previous admin made a directory:

/var/adm/lists

And there are some important scripts in it. For now can't skip anything except /proc and /dev

Unless there is a really large chunk of data somewhere that I can be sure is not vital (as I could use a bit of space).


All times are GMT -5. The time now is 01:08 PM.