mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
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.
This commit is contained in:
committed by
Jaime Casanova
parent
a7eff1f39e
commit
1aa36ca1c1
2
repmgr.c
2
repmgr.c
@@ -2057,7 +2057,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user