Skip to content

Commit 6b073fd

Browse files
authored
Properly format ipv6 address for rsync (#1187) (#1189)
1 parent 5fac7f9 commit 6b073fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

postgres-appliance/major_upgrade/inplace_upgrade.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ def rsync_replica(config, desired_version, primary_ip, pid):
717717

718718
env = os.environ.copy()
719719
env['RSYNC_PASSWORD'] = postgresql.config.replication['password']
720+
primary_ip = f'[{primary_ip}]' if ':' in primary_ip else primary_ip
720721
if subprocess.call(['rsync', '--archive', '--delete', '--hard-links', '--size-only', '--omit-dir-times',
721722
'--no-inc-recursive', '--include=/data/***', '--include=/data_old/***',
722723
'--exclude=/data/pg_xlog/*', '--exclude=/data_old/pg_xlog/*',

0 commit comments

Comments
 (0)