-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org]On Behalf Of Mad Unix Sent: Monday, July 21, 2008 11:14 AM To: CentOS mailing list Subject: Re: [CentOS] copy
How would you do the tar zcvf - /usr/local/apache/htdocs | ssh root@1.2.3.4 mailto:root@1.2.3.4 "cat > >/var/www/html/htdocs.tar.gz"
with rsync and the to have it in the crontab to run everyday.
Thanks
My suggestion: Setup SSH to use keys. Google ssh keys for explaination. Read some of the many tutorials on rsync out there.
Tip: if you're going to run the script daily you should consider setting up a lock file. By using a lock file you won't have to worry about the script completing before the next one starts.
If you're impatient email me and I'll give you a copy of the script I wrote.
PS Please post questions in text format not html.
Dan
<snip>