Amanda-Users

why is tar(1) being passed "--directory //windows/share"?

2003-07-30 07:58:01
Subject: why is tar(1) being passed "--directory //windows/share"?
From: linux AT horizon DOT com
To: amanda-users AT amanda DOT org
Date: 30 Jul 2003 11:54:31 -0000
I'm trying to set up amanda to back up a Windows (XP) machine.
I've got all the permissions set up on the remote machine, but when
I try to run amdump, I get some very confusing errors.

The server and samba client is a Linux Debian-x86 box, running
samba 3.0.0beta2-1 and amanda 1:2.4.4-2.

(The "1:" is an artifact of the Debian package management system, and
the "-2" is the second Debian package, which was actually justa dependency
fix.)

Anyway, setting up disklist and amandapass appropriately, I got
the following error reported:

/-- server    //windows/share lev 0 STRANGE
sendbackup: start [server://windows/share level 0]
sendbackup: info BACKUP=/usr/bin/smbclient
sendbackup: info RECOVER_CMD=/bin/gzip -dc |/usr/bin/smbclient -f... -
sendbackup: info COMPRESS_SUFFIX=.gz
sendbackup: info end
? Error opening local file \\windows\share - Permission denied
? Usage: [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER]
?         [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list 
HOST]
?         [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar 
<c|x>IXFqgbNan]
?         [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES]
?         [-p|--port PORT] [-d|--debuglevel DEBUGLEVEL]
?         [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE]
?         [-V|--version] [-O|--socket-options SOCKETOPTIONS]
?         [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP]
?         [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos]
?         [-A|--authentication-file FILE] service <password>
??error [/usr/bin/smbclient returned 1]? dumper: strange [missing size line from
 sendbackup]
? dumper: strange [missing end line from sendbackup]
\--------

and the following sendbackup.$DATE.debug file:

sendbackup: debug 1 pid 27600 ruid 34 euid 34: start at Wed Jul 30 02:17:39 2003
/usr/lib/amanda/sendbackup: version 2.4.4
  parsed request as: program `GNUTAR'
                     disk `//windows/share'
                     device `//windows/share'
                     level 0
                     since 1970:1:1:0:0:0
                     options 
`|;auth=bsd;compress-fast;index;exclude-list=/etc/amanda/exclude.gtar;'
sendbackup: try_socksize: send buffer size is 65536
sendbackup: time 0.001: stream_server: waiting for connection: 0.0.0.0.19617
sendbackup: time 0.001: stream_server: waiting for connection: 0.0.0.0.19618
sendbackup: time 0.001: stream_server: waiting for connection: 0.0.0.0.19619
sendbackup: time 0.001: waiting for connect on 19617, then 19618, then 19619
sendbackup: time 0.007: stream_accept: connection from 192.35.100.1.19620
sendbackup: time 0.007: stream_accept: connection from 192.35.100.1.19621
sendbackup: time 0.007: stream_accept: connection from 192.35.100.1.19622
sendbackup: time 0.007: got all connections
sendbackup: time 0.007: spawning /bin/gzip in pipeline
sendbackup: argument list: /bin/gzip --fast
sendbackup-gnutar: time 0.008: pid 27603: /bin/gzip --fast
sendbackup-gnutar: time 0.124: doing level 0 dump from date: 1970-01-01  
0:00:00 GMT
sendbackup-gnutar: time 0.127: backup of \\windows\share
sendbackup: time 0.137: spawning /usr/bin/smbclient in pipeline
sendbackup: argument list: smbclient \\windows\share -U netbackup -E -d0 -Tqca -
sendbackup-gnutar: time 0.138: /usr/bin/smbclient: pid 27606
sendbackup: time 0.142: started index creator: "/bin/tar -tf - 2>/dev/null | 
sed -e 's/^\.//'"
sendbackup: time 0.461: 124: strange(?): Error opening local file 
\\windows\share - Permission denied
sendbackup: time 0.462: 124: strange(?): Usage: [-?|--help] [--usage] 
[-R|--name-resolve NAME-RESOLVE-ORDER]
sendbackup: time 0.463: 124: strange(?):         [-M|--message HOST] 
[-I|--ip-address IP] [-E|--stderr] [-L|--list HOST]
sendbackup: time 0.464: 124: strange(?):         [-t|--terminal CODE] 
[-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan]
sendbackup: time 0.464: 124: strange(?):         [-D|--directory DIR] 
[-c|--command STRING] [-b|--send-buffer BYTES]
sendbackup: time 0.465: 124: strange(?):         [-p|--port PORT] 
[-d|--debuglevel DEBUGLEVEL]
sendbackup: time 0.466: 124: strange(?):         [-s|--configfile CONFIGFILE] 
[-l|--log-basename LOGFILEBASE]
sendbackup: time 0.467: 124: strange(?):         [-V|--version] 
[-O|--socket-options SOCKETOPTIONS]
sendbackup: time 0.468: 124: strange(?):         [-n|--netbiosname NETBIOSNAME] 
[-W|--workgroup WORKGROUP]
sendbackup: time 0.469: 124: strange(?):         [-i|--scope SCOPE] [-U|--user 
USERNAME] [-N|--no-pass] [-k|--kerberos]
sendbackup: time 0.472: 124: strange(?):         [-A|--authentication-file 
FILE] service <password>
sendbackup: time 0.475: index created successfully
sendbackup: time 0.477: error [/usr/bin/smbclient returned 1]
sendbackup: time 0.478: pid 27600 finish time Wed Jul 30 02:17:39 2003


I noticed that the new smbclient wasn't happy with \-separated file
names, so I went in and hacked out three lines of makesharename() in
client-src/findpass.c:

       amfree(buffer);                          /* should never happen */
       return NULL;                             /* buffer not big enough */
     }
-    if (ch == '/') {
-      ch = '\\';                               /* convert '/' to '\\' */
-    }
     if (ch == '\\' && shell) {
       *s++ = '\\';                             /* add escape for shell */
     }

I also got rid of the exclude list (that wasn't appropriate to windows
anyway) and that moved the error, although there are signs of the same
error above.

Now I get 

  server    //windows/share lev 0 FAILED [disk //windows/share offline on 
server?]

and the following sendsize.$DATE.debug file:

sendsize: debug 1 pid 13473 ruid 34 euid 34: start at Wed Jul 30 07:26:14 2003
sendsize: version 2.4.4
sendsize[13473]: time 0.179: waiting for any estimate child
sendsize[13482]: time 0.200: calculating for amname '//windows/share', dirname 
'//windows/share', spindle 2
sendsize[13482]: time 0.200: getting size via gnutar for //windows/share level 0
sendsize[13482]: time 0.206: spawning /usr/lib/amanda/runtar in pipeline
sendsize[13482]: argument list: /bin/tar --create --file /dev/null --directory 
//windows/share --one-file-system --listed-incremental 
/var/lib/amanda/gnutar-lists/server__windows_share_0.new --sparse 
--ignore-failed-read --totals --exclude-from 
/tmp/amanda/sendsize.__windows_share.20030730072615.exclude .
sendsize[13482]: time 0.238: /bin/tar: //windows/share: Cannot chdir: No such 
file or directory
sendsize[13482]: time 0.240: /bin/tar: Error is not recoverable: exiting now
sendsize[13482]: time 0.242: .....
sendsize[13482]: estimate time for //windows/share level 0: 0.036
sendsize[13482]: no size line match in /bin/tar output for "//windows/share"
sendsize[13482]: .....
sendsize[13482]: estimate size for //windows/share level 0: -1 KB
sendsize[13482]: time 0.242: waiting for /bin/tar "//windows/share" child
sendsize[13482]: time 0.242: after /bin/tar "//windows/share" wait
sendsize[13482]: time 0.243: getting size via gnutar for //windows/share level 1
sendsize[13482]: gnutar: error opening 
/var/lib/amanda/gnutar-lists/server__windows_share_0: No such file or directory
sendsize[13482]: time 0.250: spawning /usr/lib/amanda/runtar in pipeline
sendsize[13482]: argument list: /bin/tar --create --file /dev/null --directory 
//windows/share --one-file-system --listed-incremental 
/var/lib/amanda/gnutar-lists/server__windows_share_1.new --sparse 
--ignore-failed-read --totals --exclude-from 
/tmp/amanda/sendsize.__windows_share.20030730072615000.exclude .
sendsize[13482]: time 0.266: /bin/tar: //windows/share: Cannot chdir: No such 
file or directory
sendsize[13482]: time 0.267: /bin/tar: Error is not recoverable: exiting now
sendsize[13482]: time 0.269: .....
sendsize[13482]: estimate time for //windows/share level 1: 0.019
sendsize[13482]: no size line match in /bin/tar output for "//windows/share"
sendsize[13482]: .....
sendsize[13482]: estimate size for //windows/share level 1: -1 KB
sendsize[13482]: time 0.269: waiting for /bin/tar "//windows/share" child
sendsize[13482]: time 0.269: after /bin/tar "//windows/share" wait
sendsize[13482]: time 0.270: done with amname '//windows/share', dirname 
'//windows/share', spindle 2
sendsize[13473]: time 0.270: child 13482 terminated normally
sendsize: time 0.271: pid 13473 finish time Wed Jul 30 07:26:15 2003

tar, of course, is very unhappy to be passed such a bogus file name.


I've looked through client-src/sendbackup-gnutar.c a bit and can't quite
figure out what's not working in there.

I'm pretty unclder on why tar needs the --directory option in the first
place, actually..

Help?

<Prev in Thread] Current Thread [Next in Thread>