LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   save daily from cron job the whole Web servers data (https://www.linuxquestions.org/questions/linux-general-1/save-daily-from-cron-job-the-whole-web-servers-data-90680/)

cccc 09-08-2003 06:40 PM

save daily from cron job the whole Web servers data
 
hi

how to save daily from cron job
the whole Web servers data from /srv/www
and send it via ftp to other linux server ?
I would be very glad, if someone could
post the script.

kind regards
cccc

Tinkster 09-08-2003 09:29 PM

No script, just a hint :)

rsync

Have fun,
Cheers,
Tink

david_ross 09-09-2003 01:28 PM

I would go with rsycn over ssh too.
First setup passwordless logins:
1) login as a user on the client (where you want to connect from)
2) ssh-keygen -t dsa
(don't suppy a passphrase)
3) scp ~/.ssh/id_dsa.pub REMOTEUSER@REMOTEHOST:/home/REMOTEUSER/.ssh/authorized_keys2


Then create a cron job like this:
rsync -e ssh -arz /srv/www root@other.server:/srv/

If for some reason you can't use ssh and rsync then take a look at ftpcopy.


All times are GMT -5. The time now is 07:54 PM.