From 6a8336b880ef2bde615fbc173cfecda76401041b 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 d033cec2..e6d26907 100644 --- a/repmgr.c +++ b/repmgr.c @@ -2028,7 +2028,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]) {