Web Hosting Talk







View Full Version : what is the command to send a file?


athlonkmf
04-20-2004, 05:09 AM
I want to make a cron-script to upload backups to another server, but the ftp-command is an interactive one.

So anyone got an example of a cron-script to move a file from one server to another server?

Djoppa
04-20-2004, 05:37 AM
What's a cron-script? I do know how to move a file from one server to another server!

Loon
04-20-2004, 05:53 AM
PHP has it's own set of FTP functions, such as ftp_connect() ftp_put() etc quite simple stuff.

See http://uk.php.net/manual/en/ref.ftp.php for reference, i'm sure you'll find some example code in the notes there too.

Burhan
04-20-2004, 07:01 AM
You can pass a file that has all the commands to the ftp command in an argument. For Windows version of ftp, the command line argument is -s

On FreeBSD, you can pass the complete URL http://user@host:port/dir/file.ext to enable automatic fetching.

You may be use a different ftp client (ncftp, etc.) to get more options for Linux/Unix based systems.

Brightadmin
04-24-2004, 02:34 AM
Hi,

The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network link, using an efficient checksum-search algorithm described in the technical report at accompanies this package.

you can place single rsync command in cron to run.

for further details http://rsync.samba.org/

Regards,

Bright:)
24/7 Technical Support