[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] How do you transfer directory and files RAQ to RAQ with SSH ?



At 12:14 PM 06/05/03 +0100, you wrote:
 -Not quite sure what you mean, if you just want to move the files
 - to the other RaQ550, ftp. Then delete the old files.

Gerald
I mean  server.com/home/backup/* to be copied to
server2.com/home/backup/*

How can I copy datafrom one server to another?

TUNC

This is a small piece of a shell script showing how to use command line ftp in BASH. This can be run from a daily cron job.

#!/bin/bash

echo Transferring Files from a shell script:

# ------------------------------------------
# See ~/.netrc for login changes!!
# ------------------------------------------

ftp -i backup.myserver.com <<**
cd /home/backups
mkdir $d
cd $d
binary
mput *
ls -x1A
bye
**

echo Completed







---------------------------------
William J.A. Brillinger
Precision Design Co.

E-Mail:   mailto:billy@xxxxxxxxxx
Web site: http://www.pdcweb.net