Re: Is this a job for wget?
chris-usenet_at_roaima.co.uk
Date: 11/23/04
- Next message: Jonathan de Boyne Pollard: "Are all of Alan Connor's cases actually solved by Spot, the police cat?"
- Previous message: chris-usenet_at_roaima.co.uk: "Re: shared calendar with a linux server and windows clients"
- In reply to: Jeff: "Is this a job for wget?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 23 Nov 2004 11:58:03 +0000
Jeff <soldier@charter.net> wrote:
> I have a nightly cron job on server1 that backups files to a backup
> directory.
> I'd like to copy the resulting tar file to server2, located on a WAN.
I'd use rsync for this, running over ssh. The "obvious" place to do this
is as part of the existing cron job, immediately after the backup has
completed.
(a) from server1 to server2:
rsync -avP -z -e ssh /path/to/*.tar server2:/path/to/destination/dir
(b) from server2 to server1:
rsync -avP -z -e server1:'/path/to/*.tar' /path/to/destination/dir
Notes:
* Use either (a) or (b) but not both
* Remove the -z flag if your files are already compressed
* Set up ssh certificates to ensure you don't need to provide
a password. If you don't know how to do that, read up ssh-keygen
and then ask here again if you're still stuck.
* If your remote user account is different to the local one, prefix
the remote hostname with "user@", where "user" is the remote
username.
* rsync only copies changes, so it's (reasonably) efficient to
call it even when there have been no changes to the source
data files
Chris
- Next message: Jonathan de Boyne Pollard: "Are all of Alan Connor's cases actually solved by Spot, the police cat?"
- Previous message: chris-usenet_at_roaima.co.uk: "Re: shared calendar with a linux server and windows clients"
- In reply to: Jeff: "Is this a job for wget?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|