LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-15-2008, 04:48 PM   #31
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31

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?
 
Old 08-15-2008, 05:52 PM   #32
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
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).
 
Old 08-15-2008, 07:09 PM   #33
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
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

Last edited by davidstvz; 08-15-2008 at 07:52 PM.
 
Old 08-15-2008, 07:57 PM   #34
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
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.
 
Old 08-15-2008, 08:06 PM   #35
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
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 ...

Last edited by davidstvz; 08-15-2008 at 08:19 PM.
 
Old 08-16-2008, 08:44 AM   #36
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
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.
 
Old 08-16-2008, 09:22 AM   #37
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by trickykid View Post
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).

Last edited by davidstvz; 08-16-2008 at 09:24 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions for sys admins bhert Linux - General 5 07-15-2007 03:13 PM
Using a DDS5 tape drive to restore from a DDS3 backup tape. AndrewCAtWayofthebit Linux - Hardware 1 05-14-2006 09:15 AM
newbie tar/tape backup questions mattl Fedora 3 04-24-2006 10:07 PM
Doin a weekly tape backup - multiple questions - VERY important - Please help WorldBuilder Linux - General 10 04-25-2003 03:12 PM
2 questions(Re: backup to scsi tape drive) ascii2k Linux - General 5 07-16-2001 05:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration