[Tutor] rsync python script
tktucker at gmail.com
Fri Mar 21 11:57:21 CET 2008
The success or failure could be confirmed by checking the exit status and/or
confirming host77 has the same /var/lib file structure as the source host.
The later is the most accurate, however a bit more complicated to confirm.
As for determining the reason for failure, possible causes off the top of my
head might be name resolution, network failure, either system being offline,
crond problems on originating system, /var/lib filesystem full on host77,
etc. I would continue to brainstorm other possible causes and think of ways
to check for it in your script. For example, perform a name resolution check
on host77. If resolvable, proceed to ping check method. Good luck.
On Fri, Mar 21, 2008 at 3:08 AM, Kaushal Shriyan <kaushalshriyan at gmail.com>
> MAILTO=kaushal at example.com
> 0 18 * * * rsync -av /var/lib/mysql kaushal at host77:/var/lib/
> If i put this two lines in crontab it will run correctly,My requirement
> was to create a python script, this python script should indicate success or
> failures and the reason for failure
> Any ideas
> Thanks and Regards
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor