LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 04: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, 05: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, 05: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, 05: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, 03: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 05:00 PM
Schedule a Backup with Tar globochem Linux - Newbie 2 02-28-2005 12:49 PM
Tar backup TheRealDeal Linux - General 7 02-08-2005 03:25 PM
Using tar for backup. TheRealDeal Linux - General 2 08-10-2004 11:46 PM
tar: How do I backup everything !! grantm Linux - Newbie 3 07-30-2003 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 03:24 AM.

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