Skip to content

Commit

Permalink
rudder-contrib-backup 0.0-4: Ignore errors from tar backing up logs
Browse files Browse the repository at this point in the history
  • Loading branch information
driehuis committed May 3, 2021
1 parent 0afe914 commit 42550f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rudder-contrib-backup/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: rudder-contrib-backup
Version: 0.0-3
Version: 0.0-4
Section: base
Priority: optional
Architecture: all
Expand Down
3 changes: 2 additions & 1 deletion rudder-contrib-backup/usr/sbin/rudder-contrib-backup
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ tar -C /var/rudder -zcf rudder-backup-$(date +%Y%m%d).tar.gz configuration-repos
tar -C /opt/rudder -zcf rudder-etc-backup-$(date +%Y%m%d).tar.gz etc/

# Finally, backup the logs (if you need them)
tar -C /var/log -zcf rudder-log-backup-$(date +%Y%m%d).tar.gz rudder/
# We ignore errors from tar. Use filesystem monitoring to catch disk full errors.
tar -C /var/log -zcf rudder-log-backup-$(date +%Y%m%d).tar.gz rudder/ || true

# End of sample backup code.
# If we get here, we encountered no errors. Record the timestamp to $last_success_marker_file.
Expand Down

0 comments on commit 42550f0

Please sign in to comment.