10-24-05 08:49 PM
Hello newsgroup,
i am trying to copy some files from one machine to the other,
automatically.
therefore i created two scripts, which are using tar and netcat. one is
the sender and
the other the recipient:
#!/bin/sh
# Skriptname: copy_sender.sh
cd /var/log
/bin/tar -cv save/* | /usr/bin/netcat 192.168.20.1 2265
#!/bin/sh
# Skriptname: /root/bin/copy_recipient.sh
cd /backups
/usr/bin/netcat -l -p 2265 -w 420 | /bin/tar xv
when i run them on the command-line (recipient first), everthing is
fine. The files get transfered
as expected.
however, when i run the recipient from "at" or "cron" i get an email
containing the errormessage
save/messages-20041110.gz
tar: Unerwartetes Dateiende im Archiv. (unexpected end of file in
archiv)
tar: Unerwartetes Dateiende im Archiv. (unexpected EOF in archiv)
tar: Nicht behebbarer Fehler: Programmabbruch. (unrecoverable error:
aborting)
i tried it with different types of files (html, big text files, just
tar, tgz)
under at/cron it doesn't work. The transfer is started but it doesn't
complete.
I also tried to send it from/to localhost.
There is a enough free space on both machines.
Both machines are running linux (kernel 2.6.5).
tar (GNU tar) 1.13.25
Copyright =A9 2001 Free Software Foundation, Inc.
at version 3.1.8
netcat [v1.10]
Does anybody have any suggestion why this does work from the shell but
not under at/cron ?
Thanks in advance
Henrik
[ Post a follow-up to this message ]
|