mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 08:06:29 +00:00
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.
This commit is contained in:
2
repmgr.c
2
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);
|
maxlen_snprintf(rsync_flags, "%s", options.rsync_options);
|
||||||
|
|
||||||
if (runtime_options.force)
|
if (runtime_options.force)
|
||||||
strcat(rsync_flags, " --delete");
|
strcat(rsync_flags, " --delete --checksum");
|
||||||
|
|
||||||
if (!remote_user[0])
|
if (!remote_user[0])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user