Verify tar command tape backup under Linux or UNIX

by on February 6, 2007 · 13 comments· LAST UPDATED September 24, 2007

in , ,

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

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:

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 13 comments… read them below or add one }

1 Sajjad March 20, 2007 at 10:48 am

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


Sajjad Ahmad


2 Omer April 17, 2007 at 6:01 am

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 February 8, 2008 at 12:57 pm

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 June 10, 2008 at 6:09 am

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?


5 A. Sheri October 24, 2008 at 3:19 pm

Verify tar command tape restore under Linux or UNIX

Good Day,

I want to to restore the backup (tape) to save it on a DVD, could you please be so kind to assist me.

I thank you for your kind assistance.



6 aparna February 26, 2009 at 10:15 am

how to take backup in linux on hard disk
is it necessary to create new partition


7 manasa kallianpur August 18, 2009 at 7:21 am

how to take backup of a drive on tape in unix


8 UnixAmature September 6, 2010 at 9:49 am

you can try the tar command.

# tar -cvf /directory_name /dev/rmt/0m
/dev/rmt/0m is the tape drive path. please check the tape drive first using the command–
# ioscan -fnCtape
tape drive path may be /dev/rmt/0m or /dev/rmt/0mn or /dev/rmt/1m or 1mn. check it in ur machine


9 arun April 2, 2010 at 3:09 pm

dear sir/madam

i want to take backup daily but i don’t know how to do.. any one can help me. im using linux redhat enterprise 4 & 5. And i want to know how to write these back up in shell scripts


10 prince gupta February 26, 2011 at 9:09 am

Let Say if you want to take backup of /etc dir.

# tar -cvf etcbackup.tar /etc
It will back up of your /etc dir. in root home dir. in tar format.


11 zimmy July 11, 2011 at 10:29 am

hi all could u pls help

i need to take back using tar bt except last two days….means example from 4th july to 8th july

pls reply nd explain steps



12 tin September 12, 2011 at 8:22 am

hi All
in linux i istalled ubax_cbmr, in that cbmr how to take backup ? what is the command?
its connected with tsm.


13 B.V.YADHUKULESHA November 9, 2014 at 11:01 am


tar xv8 /usr1/wage/kaimal

kaimal is directory


Leave a Comment

Tagged as: , , ,

Previous Faq:

Next Faq: