From e40b9db0a6e2cbe56df40a6fda115858cf3c790f Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Mon, 7 Jul 2014 10:42:45 +0900 Subject: [PATCH] Properly specify rsync --exclude directories Using '--exclude=dirname/*' to explicitly specify directories whose contents should not be copied. This will result in empty directories being created on the destination if they exist on the source, but that's not a problem as they are needed anyway. Previously the generated rsync command contained '--exclude=pg_log*', which will break replication on 9.5 as the wildcard expansion prevents the 'pg_logical' directory from being copied. --- repmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repmgr.c b/repmgr.c index 939ea9a7..6a0e3553 100644 --- a/repmgr.c +++ b/repmgr.c @@ -2014,7 +2014,7 @@ copy_remote_files(char *host, char *remote_user, char *remote_path, if (is_directory) { strcat(rsync_flags, - " --exclude=pg_xlog* --exclude=pg_log* --exclude=pg_control --exclude=*.pid"); + " --exclude=pg_xlog/* --exclude=pg_log/* --exclude=pg_control --exclude=*.pid"); maxlen_snprintf(script, "rsync %s %s:%s/* %s", rsync_flags, host_string, remote_path, local_path); }