About Linux FAQ

Browse More FAQs:

Verify tar command tape backup under Linux or UNIX

Posted by Vivek Gite [Last updated: September 24, 2007]

Q. I am using tar command to backup data to tape. How do I verify that tape backup is in a good condition?

A. GNU/tar has -w or --verify option. This option attempt to verify the archive after writing it to tape, use command as follows to backup and verify the backup.

Verify TAR backup with -w and --verify options

Type the command as follows to backup /home to /dev/st0 and attempt to verify the archive after writing it /dev/st0.
# tar -cvpWlf /dev/st0 /home

Where,
c : create a new archive of /home
v : Verbose output
p : Ignore umask when extracting files i.e. preserve permissions on files
W : attempt to verify the archive after writing it
l : stay in local file system when creating an archive
f : Specify /dev/st0 as tape device (file)
/dev/st0: Tape device name.
/home : Directory to backup

For more information see:

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Discussion on This FAQ

  1. Sajjad Says:

    dear Sir/madam,

    I am facing problem whihle writing cammand in Unix to take backup on tape device. sir/madan kindly help me in quick time. i am trying this command on SCo Unix System V/386 release 3.2

    # tar cvfb /dev/rct0 20 ./usr/shares backup taken on: 20/03/2007

    please tell me eather my command is correct and also help if it is not correct

    thanks

    Sajjad Ahmad
    Pakistan

  2. Omer Says:

    Hi ,
    I’m taking backup on a tape through an automated script but lately i’ve been getting an error

    /dev/nst0: Input/output error

    How do i check this error in advance so that a mail could be fired ??
    Can u please give me the commands ??

  3. Syed Faisal Jafri Says:

    i want to take backup daily but i don’t know how to do.. any one can help me. im using linux redhat enterprise ws4 u5.

  4. Ashraf Says:

    sir/madam
    i am taking backup on a tape (HP DDS-2 data catridge).the command like “tar cvf /dev/st0 test” is using for copying & “tar rvf /dev/st0 test1″ using append the file.but rvf command not working … why?

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , ,

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.