mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user