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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-31-2002, 10:29 AM
|
#1
|
Member
Registered: Dec 2001
Location: Beckwith Township, Ontario, Canada
Distribution: Slackware 14.0, Slackware-64 14.1
Posts: 119
Rep:
|
DAT with tar/mt
I'm attempting to write multiple archives to a tape, but I'm missing something...
I thought that this would work:
tar -cf /dev/nst0 /dir1
mt-st -f /dev/nst0 eod
tar -cf /dev/nst0 /dir2
mt-st -f /dev/nst0 rewind
Checking the tape with tar -xvf /dev/nst0, all which appears to be on the tape is the contents of /dir1.
My guess is that I'm either writing the data to the tape incorrectly, or I'm not using tar correctly to check the tape's contents.
Can anyone point me in the right direction?
TIA...
|
|
|
09-01-2002, 10:55 AM
|
#2
|
Member
Registered: Aug 2002
Distribution: RedHat / Debian / Ubuntu
Posts: 35
Rep:
|
tar cf /dev/nst0 /dir1 /dir2 will work fine.
|
|
|
09-02-2002, 10:16 AM
|
#3
|
Member
Registered: Dec 2001
Location: Beckwith Township, Ontario, Canada
Distribution: Slackware 14.0, Slackware-64 14.1
Posts: 119
Original Poster
Rep:
|
I agree that <tar cf /dev/nst0 /dir1 /dir2> will work, however there is another application which I have in mind it will not work for.
I'm going to be setting up a script and a CRON job to perform incremental backups at regular intervals--to pull this off, I would like to be able to append a tar file to a tape which already contains data.
Last edited by dguy; 09-02-2002 at 10:17 AM.
|
|
|
09-02-2002, 10:18 AM
|
#4
|
Member
Registered: May 2002
Location: London
Distribution: Debian
Posts: 388
Rep:
|
Why not use a piece of backup software to manage this for you?
http://www.amanda.org
Regards
|
|
|
09-17-2002, 03:33 PM
|
#5
|
Member
Registered: Dec 2001
Location: Beckwith Township, Ontario, Canada
Distribution: Slackware 14.0, Slackware-64 14.1
Posts: 119
Original Poster
Rep:
|
Why not? 'cause my initial thought was to do it all myself for the learning experience.
I'm curious about Amanda though--before spending the time downloading & building it, do you have any idea if it requires X-Windows? I couldn't find that information after buzzing through the FAQ at sourceforge, and the system which I would be installing it upon is command-line only.
|
|
|
06-26-2003, 06:54 PM
|
#6
|
LQ Newbie
Registered: Mar 2003
Posts: 19
Rep:
|
Amanda does not require X nor does it have GUI.
It uses the native system dump or tar to back up
data, and has its own way of managing the index
database.
|
|
|
06-26-2003, 08:27 PM
|
#7
|
Moderator
Registered: Aug 2002
Posts: 26,256
|
I'm thinking no need to go to eod since nst0 will not rewind and the tape will be at eod anyway.
I can't prove this since my tape drive is off but the tape will stop and the end of file marker on the first file written to tape.
The status option of mt will tell you how many files were written and the location of the tape drive. When you restore the first file where is the tape location? It should be at the beginning of the second file.
|
|
|
06-27-2003, 08:38 AM
|
#8
|
Member
Registered: Dec 2001
Location: Beckwith Township, Ontario, Canada
Distribution: Slackware 14.0, Slackware-64 14.1
Posts: 119
Original Poster
Rep:
|
Amanda
Quote:
Originally posted by bqh
Amanda does not require X nor does it have GUI.
It uses the native system dump or tar to back up
data, and has its own way of managing the index
database.
|
Yep, I've noticed.
A short time ago I was ready for a few trial runs of my first stab at an Amanda configuration, but the untimely death of a HDD put that on hold for a while.
Amanda, at least for me , has quite the learning curve to it. I was really hoping to get my hands on a well-commented sample set-up or two... haven't found one yet, but then I haven't looked in a while either.
-d.
|
|
|
06-27-2003, 10:08 AM
|
#9
|
Moderator
Registered: Aug 2002
Posts: 26,256
|
Well I finally tested your commands on my DLT and had similar results.
The only way I could restore the 2nd file from tape was to rewind and then fsf to the second file and then extract.
In summary:
tar -cvf /dev/nst0 /dir1
tar -cvf /dev/st0 /dir2
tar -xvf /dev/st0
mt -f /dev/nst0 fsf
tar -xvf /dev/st0
|
|
|
07-14-2003, 10:57 PM
|
#10
|
Member
Registered: Jul 2002
Location: singapore
Distribution: red had 7.2
Posts: 109
Rep:
|
Hi all
I need advise on how to do multi-volume archive on HP Superstore dat 24 (scsi tape)
My current backup script contains the following
tar cMpf nst0 server_path
The script is on cron job. The cron job is working fine, the problem is it doesn't prompt for to insert the second tape. Do i need to include the tape length or block size. Please advise.
Appreciate if anyone can help.
x2000koh
|
|
|
07-14-2003, 11:30 PM
|
#11
|
LQ Newbie
Registered: Mar 2003
Posts: 19
Rep:
|
I do not think tar can span tape.
That's the reason why everyone in Amanda group says you should divide your data into sub-sections so that tar can run them individually.
|
|
|
07-23-2003, 02:23 PM
|
#12
|
LQ Newbie
Registered: Jul 2003
Location: Hampton, VA
Posts: 1
Rep:
|
Backup Script help for a newbie
Hello,
I'm very new to scripting on Linux, so please bear with me. I need two directories backed up to tape every night (no diff or incr needed). I need this to run via cron every night. My understanding is that the script should look like this:
tar -cvf /dev/st0 /dir1 /dir2
mt -st -f /dev/st0 rewind
Is this all that is necessary? I want to make sure that directories within /dir1 and /dir2 are backed up as well. I also need the tar cmd to perform the verify. Finally, I'd like to set this up to run Monday through Friday at 0200. I simply do not know what to do next.
Thanks for your help!
|
|
|
All times are GMT -5. The time now is 07:39 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|