Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-01-2009, 12:12 PM   #1
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
How to put more than one tar file on a tape

Hi there --

I have two directories that I would like to back up to tape using tar. I need to keep them as separate files. What would be the correct command syntax to use in order to have two separate tar files on a single tape? Thanks.
Old 05-01-2009, 02:24 PM   #2
Registered: Feb 2007
Distribution: RHEL 4, SOLARIS 10
Posts: 91

Rep: Reputation: 15
There are two tape devices (possibly more?) one of which rewinds first and the other doesn't.

tar czvf /dev/st0 *

This rewinds before executing

tar czvf /dev/nst0 *

This does not rewind.

Now, in either case, if you put multiple files in they will stay multiple files on the tape. At least they will become multiple files again when untared...
Old 05-01-2009, 07:25 PM   #3
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
They are two separate files on tape as well. You can read them back separately. In order to do this you have to proceed to the second dataset using the mt command on /dev/nst0.



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
Is Tar file to tape drive faster than dir/files to tape drive? Runge_Kutta Linux - General 2 03-11-2009 07:13 AM
tar file twice? put to tape? Gzip? jantman Linux - Software 4 03-25-2007 03:01 PM
Using Tar/Star to copy a compressed file from tape geokker Linux - Software 1 09-09-2005 07:32 AM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:42 AM.

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