New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

ftp-script problem

Got problems with your B2 or B3? Share and get helped!
Post Reply
JanPihlgren
Posts: 26
Joined: 23 Mar 2009, 01:16

ftp-script problem

Post by JanPihlgren »

I have a bubbatwo with an externel 1GB esata drive.
I try to use a script to transver files from may laptop to bubba.
This is the script:
#!/bin/sh
HOST='bubba'
USER='jan'
PASSWD='password'
sufix=$(date +%Y%m%d)
#prefix1=backup_Jan.tar
prefix1=tar_backup_Jan.txt
filename1=$prefix1.$sufix
FILE=$filename1
bakupdir=backup$sufix
echo $backupdir

ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
cd /home/storage/extern/WDC_WD10EARS-22Y-1/backup/
mkdir backup$sufix
cd $backupdir
lcd /home/jan/Script/
put $prefix1 $filename1
quit
END_SCRIPT
exit 0
This is the outputmessages I get:
[jan@localhost Script]$ ./ftp_backup_to_Bubba.sh

AUTH not understood
/home/storage/extern/WDC_WD10EARS-22Y-1/backup/: No such file or directory
(remote-directory) lcd: No such file or directory
[jan@localhost Script]$
I don't understand why the script don't want to work.
Anyone that know what's the problem is?
Post Reply