LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-30-2009, 08:09 AM   #1
emymcse
LQ Newbie
 
Registered: Jun 2006
Posts: 10

Rep: Reputation: 0
tar: Verification may fail to locate original files , why ?


Dears,

I'm writing linux script to backup home directory using tar with "W" option for verification , but getting the following warning :

tar: Removing leading `/' from member names
tar: Archive contains file names with leading prefixes removed.
tar: Verification may fail to locate original files.
tar: home/_17jb.cfs: Warning: Cannot stat: No such file or directory

can any one tell me why I'm getting these warnings ?, when I checked the archive I found these files exist in it and the in the home directory .
 
Old 10-31-2009, 03:18 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
The tar command removes the leading slash, so that the paths in the tar file are relative paths. This is for safety reasons.

This means that the verification stage may be unable to find the original files. Because it is using the relative paths it finds in the tar file, it will only be able to find the original files if your current directory is the root directory (so it gives the warning "Verification may fail to locate original files").

This happened in your case, because your current directory was not root (so you received a stat error, which means the verification failed). If you want to get rid of the warnings, you would need to do something like this:

Code:
cd /
tar cfW /media/example.tar home
If you leave the slash at the start of home, you will get warnings, but the verification at least will succeed.
 
Old 11-01-2009, 02:58 AM   #3
emymcse
LQ Newbie
 
Registered: Jun 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you very much for this great help.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar and gtar fail: Archive contains obsolescent base-64 headers duderancher Linux - Enterprise 4 03-12-2008 02:25 PM
Backups (tar and gzip) fail due to auditd -- please help jdh239 Linux - Server 1 11-07-2007 12:08 PM
Doom 3: Using native installer and can't locate saved game files or config files JBailey742 Linux - Games 11 08-14-2006 06:09 PM
move files in tar.gz back to into original folders GUIPenguin Linux - General 1 05-09-2005 12:11 PM
RPM fail, Need tar.gz Ju Deddo Koinu Linux - Software 1 07-08-2003 04:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:31 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration