another 1755 daily-backup prob

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
have been trying to no end to get ftp transfers to work. Manually - everything works fine - via the script it dont - get the following....

Code:
=======================================================
Now compressing all backup types to single file MasterDailyBackup+time/date.tgz
IncredibleBackup-1290716602.tar.gz
MySQLDump-201011251323.sql.gz
removed `MySQLDump-201011251323.sql.gz'
removed `IncredibleBackup-1290716602.tar.gz'
*
ftp: $SERVER: =======================================================
*
=======================================================
FTP - Begin copying files to 207.58.143.122
unknown host
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Finished Please examine the log to ensure the files were transferred to  207.58.143.122

*

the ftp: $SERVER: =================== line does not show up in the log but on the terminal I run the script from

Any ideas? I can no longer use the pogo plug option as I now have too many backups coming into my home dsl and it gets saturated real fast since all of them backup at the same time....

Myk
 
I had the exact same problem and never found a solution. I ended up just using SAMBA. I think Darmock was working on it, but I am not sure.
Thanks
 
the solution is to dump ftp and get the ncftp package from http://www.ncftp.org/

instead of doing this

Code:
#Do not indent this code it prevents it from working correctly!!!
ftp -ivn '$SERVER' << End-Of-Session >>$LOGDIRNAME
user '$USERNAME $PASSWORD'
binary
cd '$REMOTEDIRECTORY'
mdelete *
mput *
ls -al
bye
End-Of-Session
all they have to do is use the util program that comes with ncftp called 'ncftpput' and do this command line....

Code:
ncftpput -u $username -p $password -d /var/log/ncftpput.log -m -t10 -v -R -r5 -z -F $server $remotedirectory /backup/daily/*
-u is username
-p is passwowrd
-d debug log of xfer
-m is make destination dir if not exist
-t10 connection timeout
-v turn off realtime xfer status line for script mode
-R recursive mode - grabs folders under source dir as well
-r5 retry connection attempts 5 times
-z turn on resume xfer if supported
-F try passive mode 1st, fall back to port mode if timeout etc

100% easier and more reliable

also

-W rmdir $remotedirectory

can be added to wipe it 1st, I perfer a way to keep X number of backups and delete the oldest 1st etc. Am working on that one

so if the nctftpput program does not come back with a "0" result code, there was a error (lost connection, server busy etc) so the command line could be run again, and if the dest server supports it, resume the transfer where it got broken

Code:
[I]ncftpput[/I] returns the following exit values:[INDENT]0  Success.
1  Could not connect to remote host.
2  Could not connect to remote host - timed out.
3  Transfer failed.
4  Transfer failed - timed out.
5  Directory change failed.
6  Directory change failed - timed out.
7  Malformed URL.
8  Usage error.
9  Error in login configuration file.
10  Library initialization failed.
11  Session initialization failed.[/INDENT]
 

Members online

Forum statistics

Threads
26,687
Messages
174,410
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top