LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 11-18-2005, 03:04 PM   #1
Paxmaster
Member
 
Registered: Jun 2004
Location: unknown place in NYC
Distribution: Ubuntu
Posts: 377

Rep: Reputation: 30
backup: tar with the -L option help


well I got my tape working I using this command to do my backup tar cvf /dev/st0 -L51539607552 2005Nov09Data.tar.bz2 so after couple of hours it finish it ask me to replace the tape so I did but when I hit the eject buttom on my command line it said input and output error but anyhow i replace the drive it works, I want to know it is safe to go on even the message display. How I could prevent the error

So now I have two tape contain of 2005Nov09Data.tar.bz2 How could I test the backup if I did the backup right and I didn't mis a thing

well I was thinking I should extract the sources and do md5sum but how would I do md5sum if I have two type contain single backup interesting ah

so any help would be helpfull Thx

RIP: Edie Guerrero (WWE)

Last edited by Paxmaster; 11-18-2005 at 03:09 PM.
 
Old 11-18-2005, 07:06 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,765

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
I suspect the archive is not complete.

Your command should have included the -M (multi-volume) command (to spread the backup over more than one tape). Just ejecting the tape may leave data in the buffer and not written to tape. You should first suspend tar with a <ctrl>Z, then unmount the tape device to flush the contents of the buffer to tape, then eject and insert a new tape.

Along with the -M option, you should also include the --new-volume-script=<script name> option, where <script name> is the name of a script to run at the end of a tape.

An executable script something like:
#!/bin/bash
<ctrl>Z # to suspend the tar operation.
umount /dev/st0 # to unmount the device and flush the buffer to tape.
eject /dev/st0 # to eject the tape.

Note: if these commands execute too quickly for the system to respond, insert a wait 5 command between the commands in the script. That will cause the script to wait 5 seconds before executing the next command.

#!/bin/bash
<ctrl>Z
wait 5
umount /dev/st0
wait 5
eject /dev/st0

That might work to unmount the device and eject the tape. After inserting the new tape, mount /dev/st0 to remount the device, then fg to resume tar operation.

To test the archive to see if you missed anything, tar --compare <archive name> to find differences between the archive and the file system.

Last edited by bigrigdriver; 11-18-2005 at 07:07 PM.
 
  


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
tar option Paxmaster Linux - Software 1 11-16-2005 06:27 AM
Bash backup script failing using tar and --newer option saldkj Programming 3 03-12-2005 12:03 PM
tar -C option ? shanenin Linux - Software 3 07-25-2004 09:36 PM
tar command include option? x5452 Linux - General 7 05-20-2004 10:18 PM
tar bzip2 and the -y option mark33andathird Linux - General 1 04-30-2002 12:22 PM


All times are GMT -5. The time now is 04:16 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