From 4c3aed25739fc2de8f527dafcec6703d35cd042e Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Fri, 4 Sep 2020 15:03:27 +0900 Subject: [PATCH] rsync: exclude log/pg_log directory depending on PostgreSQL version This is more for completeness as the data source here is Barman, which shouldn't contain log files anyway. --- repmgr-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repmgr-client.c b/repmgr-client.c index 38ca3709..4a393ce4 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -3130,16 +3130,16 @@ copy_remote_files(char *host, char *remote_user, char *remote_path, if (server_version_num >= 100000) { appendPQExpBufferStr(&rsync_flags, - " --exclude=pg_wal/*"); + " --exclude=pg_wal/* --exclude=log/*"); } else { appendPQExpBufferStr(&rsync_flags, - " --exclude=pg_xlog/*"); + " --exclude=pg_xlog/* --exclude=pg_log/*"); } appendPQExpBufferStr(&rsync_flags, - " --exclude=pg_log/* --exclude=pg_stat_tmp/*"); + " --exclude=pg_stat_tmp/*"); maxlen_snprintf(script, "rsync %s %s:%s/* %s", rsync_flags.data, host_string, remote_path, local_path);