summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Henrique <samueloph@debian.org>2020-06-22 19:34:32 +0100
committerWayne Davison <wayne@opencoder.net>2020-06-22 13:05:17 -0700
commite4c9ff5873dbeb5aa299824cd93bc598f1871518 (patch)
treeb2c9709410b1b91e49381da4b77423171b61ac88
parent9b13bcf1855c8601b9c3d3fc709788a3e3249131 (diff)
downloadrsync-e4c9ff5873dbeb5aa299824cd93bc598f1871518.tar.gz
Make --backup be set when --backup-dir is used
-rw-r--r--options.c1
-rw-r--r--rsync.1.md2
2 files changed, 2 insertions, 1 deletions
diff --git a/options.c b/options.c
index b5aaadee..961cd48c 100644
--- a/options.c
+++ b/options.c
@@ -2222,6 +2222,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
if (backup_dir) {
size_t len;
+ make_backups = 1; /* --backup-dir implies --backup */
while (*backup_dir == '.' && backup_dir[1] == '/')
backup_dir += 2;
if (*backup_dir == '.' && backup_dir[1] == '\0')
diff --git a/rsync.1.md b/rsync.1.md
index 4a3099b9..9acaed3c 100644
--- a/rsync.1.md
+++ b/rsync.1.md
@@ -842,7 +842,7 @@ your home directory (remove the '=' for that).
0. `--backup-dir=DIR`
- In combination with the `--backup` option, this tells rsync to store all
+ This implies the `--backup` option, and tells rsync to store all
backups in the specified directory on the receiving side. This can be used
for incremental backups. You can additionally specify a backup suffix
using the `--suffix` option (otherwise the files backed up in the specified