From 22e0556b500f5903de752f3ed39b45be724e11df Mon Sep 17 00:00:00 2001 From: Fuxino Date: Thu, 8 Oct 2026 17:41:17 +0200 Subject: [PATCH] Document that old backups are kept if rsync fails --- README.md | 5 +++++ man/simple_backup.1 | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index d7003e9..dba5e0e 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,11 @@ For Arch Linux and Arch-based distros, two packages are available in the AUR (au - **simple_backup** for the release version - **simple_backup-git** for the git version +## Old backups +The number of old backups to keep can be set with the --keep (or -k) argument (or in the configuration file). +Old backups are only removed if rsync completes successfully, so that they are not deleted when the new backup may be incomplete. +The only rsync error that is ignored is return code 24 (source files vanished during the transfer), which is common when backing up a live system. + ## Remote backup > **Warning** > This feature is experimental diff --git a/man/simple_backup.1 b/man/simple_backup.1 index d7ffcb9..4242e75 100644 --- a/man/simple_backup.1 +++ b/man/simple_backup.1 @@ -61,6 +61,10 @@ will not be copied. Multiple elements can be specified, in the same way as for t .B \-k, \-\-keep N Specify how many old backups (so excluding the current one) will be kept. The default behavior is to keep them all (same as N=\-1). +Old backups are only removed if rsync completes successfully, to avoid deleting them when the +new backup may be incomplete. rsync return code 24 (source files vanished during the transfer) +is treated as success, while any other error (including return code 23, partial transfer due to error) +will prevent old backups from being removed. This does not apply when using \-\-remove\-before\-backup. .TP .B \-u, \-\-user USERNAME Explicitly specify the user running the backup (in case it is needed for home directory expansion).