Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 09-26-2007, 05:08 AM   #1
Sagar Biswas
LQ Newbie
Registered: Jan 2006
Posts: 1

Rep: Reputation: 0
Post backup of multiple Directories in different volumes


I have a LTO 200GB TAPE.
I am using 'tar' command to take backup,but facing problem, taking backup of multiple volumes.

I have different volumes as
/appl ->32 GB
/data ->64 GB
/log ->2 GB

I want to take of these multiple volumes in a same Tape Cartridge.
But no in a single time.I need the option of taking backup of /appl in one time, /data & /log at another time ...

Please help me.
Old 09-26-2007, 07:58 AM   #2
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121

Rep: Reputation: 15
The "trick" here is understanding the different tape device files:

The second file is the 'non-rewinding' device. If you write to it, the tape does not automatically auto-rewind, allowing multiple archives to the same tape.

Once you go /dev/nst0, stick with it!

To move around the tape, use the 'mt' command, and REMEMBER TO ALWAYS USE nst:

mt -f /dev/nst0 fsf 1 # move forward one archive

mt -f /dev/nst0 asf 2 # rewind and forward to archive 2 regardless of current position

mt -f /dev/nst0 rew # rewind to beginning of tape

mt -f /dev/nst0 status # report where the hell on the tape you are.

If you slip up and use '/dev/st0' on any of the above commands, it will rewind to the beginning after completion!!!
Old 11-09-2007, 06:05 PM   #3
Registered: Dec 2006
Location: Portland, OR - USA
Distribution: Formerly Slackware; now RH, SuSE, Debian/Ubuntu, & Asianux
Posts: 55

Rep: Reputation: 15
Sorry for jumping-in so late, but I was looking for the answer to a different problem of my own and I've used a different approach to this issue. I record all the data in a single GNU tar session thus:
#initialize an empty file to make my queue
: > /tmp/joblist.txt
echo "/appl" >>/tmp/joblist.txt
echo "/data" >>/tmp/joblist.txt
echo "/log" >>/tmp/joblist.txt
echo "These directories will be tar-ed:"
cat /tmp/joblist.txt
#write the files
tar --create --filesfrom=/tmp/joblist.txt --file /dev/nst0
This approach gives me a chance to string together all sorts of files that might have been related. One could build the joblist file with all sorts of complex conditional statements and/or string hacking if one had the need to do so.


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
Change text in multiple files in multiple directories vivo2341 Linux - General 5 11-27-2006 08:16 PM
Can't mount multiple GFS volumes? mlewis Linux - Enterprise 0 09-12-2006 04:25 PM
afio and multiple volumes tiuz Linux - Software 2 06-01-2006 05:43 AM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 12:23 PM
Help I need help tarring multiple files in multiple directories VisionZ Linux - Newbie 28 03-25-2004 05:25 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:04 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration