8000 tests: windows compatibility, archive_command for windows · postgrespro/pg_probackup@04b96de · GitHub
[go: up one dir, main page]

Skip to content

Commit 04b96de

Browse files
committed
tests: windows compatibility, archive_command for windows
1 parent c7d7ceb commit 04b96de

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/helpers/ptrack_helpers.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,15 @@ def set_archiving(
877877
'postgresql.auto.conf',
878878
'archive_mode = {0}'.format(archive_mode)
879879
)
880-
archive_command = '"{0}" archive-push -B {1} --instance={2} '.format(
881-
self.probackup_path, backup_dir, instance)
880+
if os.name == 'posix':
881+
archive_command = '"{0}" archive-push -B {1} --instance={2} '.format(
882+
self.probackup_path, backup_dir, instance)
883+
884+
elif os.name == 'nt':
885+
archive_command = '"{0}" archive-push -B {1} --instance={2} '.format(
886+
self.probackup_path.replace("\\","\\\\"),
887+
backup_dir.replace("\\","\\\\"),
888+
instance)
882889

883890
if self.archive_compress or compress:
884891
archive_command = archive_command + '--compress '

0 commit comments

Comments
 (0)
0