LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 02-07-2004, 05:55 AM   #1
imsajjadali
Member
 
Registered: Jan 2004
Location: Faisalabad-Pakistan
Distribution: Red Hat Linux 2.1 Advance Server
Posts: 102

Rep: Reputation: 15
tar as backup


I am using tar command for backup on tap drive
tar cvf /dev/st0 /home/d1.txt
on next day backup d2.txt
tar cvf /dev/st0 /home/d2.txt
I want backup of d2.txt file without removing d1.txt file from tap drive. which command I can use.
how I can restore d2.txt file from tap drive.
 
Old 02-07-2004, 06:39 AM   #2
grayswander
Member
 
Registered: Apr 2003
Location: Israel
Distribution: Gentoo
Posts: 61

Rep: Reputation: 15
Make aditional backups without overriding previous:
There are two ways, the first one is obvious - use different tapes :-). The second one is more complicated.
First of all, some background information: each tar command writes a single file to the tape. For each SCSI tape there are two devices: /dev/stN and /dev/nstN. I see that you use the first one. The difference between the devices is that each time you perform an operation on it, such as read or write the file, it automatically rewinds. After you write the first file, it rewinds to the start, and when you write the second one, it overwrites the first one.
You should use the /dev/nstN instead, the first "n" is "non-rewinding". After you write the file, it remains at the end of file, thus when you write the second file, it appends to the tape.
In order to restore specific file from the tape with multiple files, you should use the "mt" command. Generally, you have to place the tape to the start of file you wish to read, and then use the standard tar command. I do not remember the exact syntax of mt, so you should read it's man page youself.

Good luck!
 
Old 02-07-2004, 06:44 AM   #3
imsajjadali
Member
 
Registered: Jan 2004
Location: Faisalabad-Pakistan
Distribution: Red Hat Linux 2.1 Advance Server
Posts: 102

Original Poster
Rep: Reputation: 15
Hi grayswander
first of all thanks for detail reply...currently I am facing the problem that I have not find mt command. when I type mt system display message
bash:mt:command not found.
From where I can get this command. I am using linux 2.1.

thanks ones again
 
Old 02-07-2004, 06:59 AM   #4
imsajjadali
Member
 
Registered: Jan 2004
Location: Faisalabad-Pakistan
Distribution: Red Hat Linux 2.1 Advance Server
Posts: 102

Original Poster
Rep: Reputation: 15
I have used the
tar cvf /dev/nst0 /home/d1.txt
tar cvf /dev/nst0 /home/d2.txt
but when I see the list by using the command
tar tvf /dev/st0
It does not show any file if I use the above command as
tar cvf /dev/nst0 /home/d1.txt
tar cvf /dev/st0 /home/d2.txt
then using list command
tar tvf /dev/nst0
display the following output
/home/d2.txt


thanks
 
Old 02-07-2004, 04:46 PM   #5
grayswander
Member
 
Registered: Apr 2003
Location: Israel
Distribution: Gentoo
Posts: 61

Rep: Reputation: 15
Try this : ftp://ftp.rucus.ru.ac.za/pub/.1/dist...-st-0.7.tar.gz
If that does not work, try to find something appropriate there : http://linux.maruhn.com/sec/mt-st.html
 
  


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
incremental backup using tar eaglegst Linux - Software 9 02-01-2009 06:00 PM
Schedule a Backup with Tar globochem Linux - Newbie 2 02-28-2005 01:49 PM
Tar backup TheRealDeal Linux - General 7 02-08-2005 04:25 PM
Using tar for backup. TheRealDeal Linux - General 2 08-11-2004 12:46 AM
tar: How do I backup everything !! grantm Linux - Newbie 3 07-30-2003 03:41 PM


All times are GMT -5. The time now is 01:58 AM.

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