I am developing a script in python that can collect logs from multiple computers. I am using rsync. But there is a problem. I have logs for several services that look like this:
service1.log service2.log service3.log ... and so on
The paths to these files and folders are indicated in the code. But sometimes I get a situation where some log files do not exist yet. And rsync will not complete successfully.
How can I skip files that do not exist on the source computer?
Postscript I use saltstack to control the machines, so I call:
__salt__['cmd.retcode']('rsync -a file1 file2...')
python linux rsync
oleg.foreigner
source share