From e04ba8bea5f9617bb1d4a26c04b4fa8ce83d3748 Mon Sep 17 00:00:00 2001 From: Jaime Casanova Date: Tue, 10 Feb 2015 20:15:40 -0500 Subject: [PATCH] Add "--checksum" in rsync when using "--force" If the user don't put that option in rsync_options using of "--force" could be unsafe. While the probability of failures because of this are low they aren't zero. --- repmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repmgr.c b/repmgr.c index 7612d923..c48f0403 100644 --- a/repmgr.c +++ b/repmgr.c @@ -1488,7 +1488,7 @@ copy_remote_files(char *host, char *remote_user, char *remote_path, maxlen_snprintf(rsync_flags, "%s", options.rsync_options); if (runtime_options.force) - strcat(rsync_flags, " --delete"); + strcat(rsync_flags, " --delete --checksum"); if (!remote_user[0]) {