Page 1 of 1

Having issues with backups and rsync

Posted: Sun Mar 26, 2017 11:44 am
by dflick
Unable to cleanup old files in rsync. Using command
rsync -avz –-delete-after –-ignore-errors -e ssh /store/backups/nagiosxi/ <user>@<destination>:/home/<user>/nagiosbackup
Output below.
sending incremental file list
rsync: link_stat "/store/backups/nagiosxi/\#226-delete-after" failed: No such file or directory (2)
rsync: link_stat "/store/backups/nagiosxi/\#226-ignore-errors" failed: No such file or directory (2)
./

Backups are transferred but the deletes are not which is cauing the remote directory to fill. Also, I am doing this on a backup user instead of nagios or root. I am trying to keep several backup separate and secure. Any issue with this strategy when using cron to schedule the rsync?

Re: Having issues with backups and rsync

Posted: Mon Mar 27, 2017 9:47 am
by avandemore
The general rule of thumb for any script is that it shouldn't spit out errors. Yours appears to be doing so. Are your permissions correct?

Re: Having issues with backups and rsync

Posted: Mon Mar 27, 2017 9:56 am
by dflick
It looks like the switches for --delete-after and --ignore-errors are being used as arguments. The man page shows the command run in the format I have listed and I get errors when putting the switches at the end. Is it a problem with rsync in the Nagios OVA image perhaps?

Re: Having issues with backups and rsync

Posted: Mon Mar 27, 2017 10:31 am
by avandemore
If it is a problem with the rsync in the OVA then it came from upstream. We don't modify it so the usage would be the same as anywhere else.

Re: Having issues with backups and rsync

Posted: Mon Mar 27, 2017 4:18 pm
by dflick
Any suggestions/options?

Re: Having issues with backups and rsync

Posted: Mon Mar 27, 2017 4:26 pm
by avandemore
It's not really a Nagios issue per se, but I'd try asking your system administrator or googling "rsync: link_stat".