LinuxQuestions.org
Review your favorite Linux distribution.
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 01-29-2008, 06:53 PM   #1
hocheetiong
Member
 
Registered: Jul 2007
Location: Penang , Malaysia.
Distribution: red hat linux
Posts: 133

Rep: Reputation: 15
How to backup more than one time on same tape using DLT tape?


Hi, I am have a DLT tape drive is 20/40GB model,than at /dev/st0. Now attach to my redhat enterprise linux system.

First time i am backup a folder /home to DLT tape:
# tar -cvf /dev/st0 /home

than ok, all file inside /home directory have been backup, i have try to check on command # tar -tvf /dev/st0.

I want to backup another directory is /etc on the same DLT tape just now, than i using same command # tar -cvf /dev/st0 /etc ,than all file show are backup. But when i want to check all my backup using command # tar -tvf /dev/st0 why just only show me the latest backup "/etc" file, than my previous backup file "/home" not show at all??

Is it my method to backup 2 or more time and continue backup at same tape are wrong?

In RHEL5 is it have any easy method(GUI) software to manage backup? is it Amanda?

Thank you for answer my question.
 
Old 01-29-2008, 07:07 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,893

Rep: Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746
The device /dev/st0 will rewind the tape when the current operation is complete.
The device /dev/nst0 will not rewind the tape when the current operation is complete.

Therefore when the first backup of your /home completes the tape rewinds and the second backup i.e /etc overwrites the first. Using /dev/nst0 will not cause the rewind to tape.
 
Old 01-29-2008, 07:37 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,770

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
You could also use tar to *append" /etc to the /home archive.

A quick look at man tar, and a bit of reseach into DLT drives, and it seems to me that you could do:
Code:
tar -cvf /dev/st0 /home
to begin the archive, then
Code:
tar -rvf /dev/st0 /etc
to append /etc to the /home archive. It will take a while longer than michaelk's suggestion because the tape will have to unwind to the end of /home before writing /etc to the archive.
 
Old 01-30-2008, 06:54 AM   #4
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,189

Rep: Reputation: 105Reputation: 105
Following up on michaelk's post, use /dev/nst0 as the device. Then when you tar a directory or partition to the tape it will be left positioned at the end. You can then tar another to the same tape and have two tape files. Continue until you hit the end of the tape (if you do).

To find out what's up with the tape, use the mt command. `mt -f /dev/nst0 status` will tell you where it is positioned. `mt -f /dev/nst0 rewind` or `mt -f /dev/nst0 fsf 1` etc. allow you to rewind or reposition the tape.

Of course, you could use Amanda to manage your backups. It might be overkill for just one machine, but then you would have learned a new tool. It is not GUI based, but it is very straightforward from the command line.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mksysb backup to tape time, or STORIX better? chaddro AIX 5 07-19-2006 04:02 PM
New system - DLT tape not being seen jlowry Linux - Hardware 2 05-26-2006 01:21 PM
Using a DDS5 tape drive to restore from a DDS3 backup tape. AndrewCAtWayofthebit Linux - Hardware 1 05-14-2006 09:15 AM
DLT Tape dvong3 Linux - Hardware 3 05-14-2004 03:46 AM
Tape incremental backup to different tape tungaw2001 Linux - Software 0 08-13-2003 09:42 PM


All times are GMT -5. The time now is 10:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration