tar Command
Hi All ! I had a issue with a tar command with one of my customers, the same below listed command works fine for me but it doesnot seem to work for one of my customer, Please advice Thanks in advance [EMAIL PROTECTED] amanda]$ tar -cvf /dev/nst0 foldera foldera/ foldera/amanda.conf foldera/disklist [EMAIL PROTECTED] amanda]$ tar -tvf /dev/nst0 [EMAIL PROTECTED] amanda]$ tar -tvf /dev/nst0 tar: /dev/nst0: Cannot read: Input/output error tar: At beginning of tape, quitting now tar: Error is not recoverable: exiting now [EMAIL PROTECTED] amanda]$ mt -f /dev/nst0 rewind [EMAIL PROTECTED] amanda]$ tar -tvf /dev/nst0 drwxr-xr-x amanda/disk 0 2005-04-01 13:35:46 foldera/ -rw-r--r-- amanda/disk 17822 2005-04-01 13:33:22 foldera/amanda.conf -rw-r--r-- amanda/disk5490 2005-04-01 13:33:22 foldera/disklist [EMAIL PROTECTED] amanda]$ mt -f /dev/nst0 rewind [EMAIL PROTECTED] amanda]$ tar -rvf /dev/nst0 folder foldera folderb [EMAIL PROTECTED] amanda]$ tar -rvf /dev/nst0 folderb folderb/ folderb/amanda.conf folderb/disklist [EMAIL PROTECTED] amanda]$ mt -f /dev/nst0 rewind [EMAIL PROTECTED] amanda]$ tar -tvf /dev/nst0 drwxr-xr-x amanda/disk 0 2005-04-01 13:35:46 foldera/ -rw-r--r-- amanda/disk 17822 2005-04-01 13:33:22 foldera/amanda.conf -rw-r--r-- amanda/disk5490 2005-04-01 13:33:22 foldera/disklist drwxr-xr-x amanda/disk 0 2005-04-01 13:36:24 folderb/ -rw-r--r-- amanda/disk 17834 2005-04-01 13:33:55 folderb/amanda.conf -rw-r--r-- amanda/disk5288 2005-04-01 13:33:55 folderb/disklist [EMAIL PROTECTED] amanda]$ -- Regards, Kaushal Shriyan Technical Engineer Red Hat India Pvt. Ltd. 1st Floor,'C'Wing, Fortune2000, Bandra Kurla Complex, Bandra(East), Mumbai 400051. Maharashtra India Tel: +91-22-3987 Fax: +91-22-39878899 Cell : +91-9820367783 E-mail : [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
Re: tar Command
On Mon, Apr 11, 2005 at 02:43:55PM +0530, Kaushal Shriyan wrote: Hi All ! I had a issue with a tar command with one of my customers, the same below listed command works fine for me but it doesnot seem to work for one of my customer, Please advice Thanks in advance [EMAIL PROTECTED] amanda]$ tar -cvf /dev/nst0 foldera foldera/ foldera/amanda.conf foldera/disklist [EMAIL PROTECTED] amanda]$ tar -tvf /dev/nst0 [EMAIL PROTECTED] amanda]$ tar -tvf /dev/nst0 tar: /dev/nst0: Cannot read: Input/output error tar: At beginning of tape, quitting now tar: Error is not recoverable: exiting now [EMAIL PROTECTED] amanda]$ mt -f /dev/nst0 rewind [EMAIL PROTECTED] amanda]$ tar -tvf /dev/nst0 drwxr-xr-x amanda/disk 0 2005-04-01 13:35:46 foldera/ -rw-r--r-- amanda/disk 17822 2005-04-01 13:33:22 foldera/amanda.conf -rw-r--r-- amanda/disk5490 2005-04-01 13:33:22 foldera/disklist [EMAIL PROTECTED] amanda]$ mt -f /dev/nst0 rewind [EMAIL PROTECTED] amanda]$ tar -rvf /dev/nst0 folder foldera folderb [EMAIL PROTECTED] amanda]$ tar -rvf /dev/nst0 folderb folderb/ folderb/amanda.conf folderb/disklist [EMAIL PROTECTED] amanda]$ mt -f /dev/nst0 rewind [EMAIL PROTECTED] amanda]$ tar -tvf /dev/nst0 drwxr-xr-x amanda/disk 0 2005-04-01 13:35:46 foldera/ -rw-r--r-- amanda/disk 17822 2005-04-01 13:33:22 foldera/amanda.conf -rw-r--r-- amanda/disk5490 2005-04-01 13:33:22 foldera/disklist drwxr-xr-x amanda/disk 0 2005-04-01 13:36:24 folderb/ -rw-r--r-- amanda/disk 17834 2005-04-01 13:33:55 folderb/amanda.conf -rw-r--r-- amanda/disk5288 2005-04-01 13:33:55 folderb/disklist [EMAIL PROTECTED] amanda]$ Unless I miss something, you show a correctly running series of commands. How about showing the error so we can analyze it? -- Jon H. LaBadie [EMAIL PROTECTED] JG Computing 4455 Province Line Road(609) 252-0159 Princeton, NJ 08540-4322 (609) 683-7220 (fax)
Re: Possible bug in windows/cygwin handling of tar command
On Thu, Apr 15, 2004 at 04:08:02PM -0700, Joe Rhett wrote: Joe, I'd put debug printf's in the exclude parsing stuff in gnu tar to debug your problem. By the time you get this far, amanda should be out of the equation. It just invokes runtar which invokes gnu tar with certain args (as shown in runtar.*.debug). ... Again, I've already done this. AND I've run the exact same command as amanda logs that it is running and I don't get those errors. Amanda appears to be running a different command than it logs that it is running. In an earlier post you indicated you had replaced tar with a perl script to analyze the call to tar. At that time you did, or could have, determined what arguments tar is actually called with and compare them with the debug log. I'm guessing, since you did not say anything about that, that you either did not check or they were the same. What is the actual situation? In another message this conversation took place: On Thu, Apr 15, 2004 at 05:40:28PM -0600, John E Hein wrote: All I've got left for you is to sprinkle fprintf's in amanda/gnu tar code and find out what's really going on, or hack it so you can attach a debugger and step through the code. John, you appear to be missing the point in grand style. TAR is not the problem! TAR does not have this problem when not run by amanda! Any code hacking needs to occur within amanda's source, to determine exactly what it really is doing. My style is just as grand. I'm too missing the point. Assuming tar is actually called with the logged arguments, why do you insist it is some amanda code that is the problem? Oh, I know, because when you run it manually it works. You may be missing the point that there is a third component in this equation, the environment. The environment could be different when you login and do things manually than when inet invokes things non-interactively. I'm not talking about just a few exported variables, but other settings may be influencing things. Just as one example, if I recall correctly, there is a cygwin environment setting that affects some aspects of cygdrive pathname resolution. Others affect whether file openings automatically handle the line ending differences between windows and unix and still others affect how filename case differences and treated. If tar is being called with the same arguments you used manually, then I'd be looking at things influencing the tar run other than amanda. Once tar is called, amanda has no other involvement in its running. -- Jon H. LaBadie [EMAIL PROTECTED] JG Computing 4455 Province Line Road(609) 252-0159 Princeton, NJ 08540-4322 (609) 683-7220 (fax)
Re: Possible bug in windows/cygwin handling of tar command
Joe Rhett wrote: What I fail to understand is that tar should NOT try to read this directory. It is explicitly excluded. It is wasting time attempting to do so. Even more to the point, these are subdirectories. It was excluded at a higher level, so it shouldn't even know about these directories. (sending to amanda-users, instead of -hackers -- more appropriate I believe.) Just to get enough details: what are the exact contents of the exclude-list and the disklist entry? And what is the exact error message you get? -- Paul Bijnens, XplanationTel +32 16 397.511 Technologielaan 21 bus 2, B-3001 Leuven, BELGIUMFax +32 16 397.512 http://www.xplanation.com/ email: [EMAIL PROTECTED] *** * I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, F6, * * quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, * * stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, * * PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, * * kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ...* * ... Are you sure? ... YES ... Phew ... I'm out * ***
RE: Possible bug in windows/cygwin handling of tar command
I hope this isn't chasing the wrong issue, but shouldn't the first './RECYCLER' entry exclude the directory ./RECYCLER and all its contents? The second entry './RECYCLER/*' forces the tar exclusion process to attempt to resolve the contents of that directory. The net effect of your exclusion list is to say: Don't look in this directory, and by the way, don't look at the contents of the directory, but first list the contents you aren't going to look at. Is this an effective description of the problem? I don't use Amanda to back up Windows, yet; but we are considering it. Thanks, Donald L. (Don) Ritchey Information Technology -Original Message- From: Joe Rhett [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 2:55 PM To: Paul Bijnens Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Possible bug in windows/cygwin handling of tar command On Thu, Apr 15, 2004 at 09:35:32PM +0200, Paul Bijnens wrote: Joe Rhett wrote: What I fail to understand is that tar should NOT try to read this directory. It is explicitly excluded. It is wasting time attempting to do so. Even more to the point, these are subdirectories. It was excluded at a higher level, so it shouldn't even know about these directories. (sending to amanda-users, instead of -hackers -- more appropriate I believe.) Just to get enough details: what are the exact contents of the exclude-list and the disklist entry? And what is the exact error message you get? Error message: ? gtar: ./pagefile.sys: file not found ? gtar: ./RECYCLER/S-1-5-21-180x67x531-1682526488-1343024091-1003/Dc13: Cannot savedir: Permission denied ? gtar: ./RECYCLER/S-1-5-21-180x67x531-1682526488-1343024091-1003/Dc14: Cannot savedir: Permission denied ? gtar: ./RECYCLER/S-1-5-21-180x67x531-1682526488-1343024091-1003/Dc15.com%2fcygwin: Cannot savedir: Permission denied ? gtar: ./RECYCLER/S-1-5-21-180x67x531-1682526488-1343024091-1003/Dc16: Cannot savedir: Permission denied /opt/amanda/etc/exclude.gtar: ./pagefile.sys ./RECYCLER ./RECYCLER/* disklist entry: host-test1.svk.isite.net /cygdrive/c mswin-gnutar mswin-gnutar is defined as: define dumptype mswin-gnutar { root-tar comment Windows partitions dumped with tar compress none priority high exclude list /opt/amanda/etc/exclude.gtar } -- Joe Rhett Chief Geek [EMAIL PROTECTED] Isite Services, Inc. This e-mail and any of its attachments may contain Exelon Corporation proprietary information, which is privileged, confidential, or subject to copyright belonging to the Exelon Corporation family of Companies. This e-mail is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this e-mail is strictly prohibited and may be unlawful. If you have received this e-mail in error, please notify the sender immediately and permanently delete the original and any copy of this e-mail and any printout. Thank You.