Skip to content

Conversation

@fthiery
Copy link

@fthiery fthiery commented Apr 29, 2020

All rsync error detection is based on the contents of the logfile. If the errors are not in the file, or if the logfile is not present, the backup script assumes everything went fine (!!!).

This PR uses the returncode as additional condition to marking the backup as successful.

Apr 29 10:40:13 backup rsync_tmbackup[28480]: [generator] io timeout after 30 seconds -- exiting
Apr 29 10:40:13 backup rsync_tmbackup[28480]: rsync error: timeout in data send/receive (code 30) at io.c(204) [generator=3.1.3]
Apr 29 11:57:58 backup rsync_tmbackup[28480]: cd+++++++++ somedir
Apr 29 11:57:58 backup rsync_tmbackup[28480]: rsync: [sender] write error: Broken pipe (32)
Apr 29 11:57:58 backup rsync_tmbackup[28480]: rsync error: timeout in data send/receive (code 30) at io.c(829) [sender=3.1.3]
Apr 29 11:57:58 backup rsync_tmbackup[28480]: rsync_tmbackup: Backup completed without errors.
Apr 29 11:57:58 backup systemd[1]: backup-diskarray.service: Succeeded.

@fthiery fthiery changed the title Fallback to rsync returncode when logfile is not created Fallback to rsync returncode when logfile is not created to detect errors Apr 29, 2020
shmilee added a commit to shmilee/arch-time-backup that referenced this pull request Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant