LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to verify or compare a tar (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-verify-or-compare-a-tar-4175432798/)

sandrajoy 10-17-2012 08:22 PM

How to verify or compare a tar
 
I am using an LTO5 HP Ultrium stand alone drive to backup computer graphics data.

The command I use from the source directory is
# tar --blocking-factor 1024 -cvf /dev/st0 subdirectoryname1 subdirectoryname2

After the tar is written to the tape I use a -tvf command to read what is on the tape to see if it matches. This takes a long time.

Can someone recommend a compare or verify command I can use? Will --verify work with my tape drive and could I just add W to my current -cvf command? Would it be -cvfW?

nugat 10-18-2012 12:07 AM

Quote:

Originally Posted by sandrajoy (Post 4808652)
Can someone recommend a compare or verify command I can use? Will --verify work with my tape drive and could I just add W to my current -cvf command? Would it be -cvfW?

You could use the -W option, but don't put it after the "f" or you'll confuse tar. Put it before it, e.g.:

Code:

tar -cvWf tar.file /files/to/tar
note that verify borks on files with absolute path that tar removes, so you may need to use the -P flag, e.g.:

Code:

tar -cvPWf tar.file /files/to/tar
Btw, I don't have a tape drive, so I have no idea if this is tape-friendly method or not! Test, test, test!

sandrajoy 10-19-2012 12:38 AM

Nugat,

Thank you. I used -cvPWf and it's working. The directories were written to LTO5 tape first and now each directory and file is being verified. Here is the how the operation is displayed in the shell at the end of the tar write and the beginning of the verify portion. Now I am waiting to see if there are any errors and what the system will say if there are errors.

13_ep111/031_111-031/CAM/maya/renderScenes/
13_ep111/031_111-031/CAM/maya/sound/
13_ep111/031_111-031/CAM/maya/assets/
13_ep111/031_111-031/CAM/maya/backplates/
13_ep111/031_111-031/CAM/maya/scenes/
13_ep111/031_111-031/CAM/syntheyes/
13_ep111/031_111-031/CAM/syntheyes/.gdi/
13_ep111/031_111-031/CAM/syntheyes/.gdi/type
13_ep111/031_111-031/CAM/syntheyes/source/
13_ep111/031_111-031/CAM/syntheyes/images/
Verify 10_ep108/
Verify 10_ep108/_QuickTime_IO/
Verify 10_ep108/_QuickTime_IO/.gdi/
Verify 10_ep108/_QuickTime_IO/.gdi/type
Verify 10_ep108/_QuickTime_IO/Layoff/
Verify 10_ep108/_QuickTime_IO/Layoff/.gdi/
Verify 10_ep108/_QuickTime_IO/Layoff/.gdi/type
Verify 10_ep108/_QuickTime_IO/Layoff/112911_FINALS/
Verify 10_ep108/_QuickTime_IO/Layoff/112911_FINALS/108_080/
Verify 10_ep108/_QuickTime_IO/Layoff/112911_FINALS/108_080/108_080_eb_B03.000018.dpx
Verify 10_ep108/_QuickTime_IO/Layoff/112911_FINALS/108_080/108_080_eb_B03.000002.dpx
Verify 10_ep108/_QuickTime_IO/Layoff/112911_FINALS/108_080/108_080_eb_B03.000017.dpx


All times are GMT -5. The time now is 07:57 PM.