@@ -1845,8 +1845,15 @@ def test_undefined_wal_file_path(self):
1845
1845
self .init_pb (backup_dir )
1846
1846
self .add_instance (backup_dir , 'node' , node )
1847
1847
self .set_archiving (backup_dir , 'node' , node )
1848
- archive_command = '\" {0}\" archive-push -B \" {1}\" --instance \" {2}\" --wal-file-name=%f' .format (
1849
- self .probackup_path , backup_dir , 'node' )
1848
+ if os .name == 'posix' :
1849
+ archive_command = '\" {0}\" archive-push -B \" {1}\" --instance \" {2}\" --wal-file-name=%f' .format (
1850
+ self .probackup_path , backup_dir , 'node' )
1851
+ elif os .name == 'nt' :
1852
+ archive_command = '\" {0}\" archive-push -B \" {1}\" --instance \" {2}\" --wal-file-name=%f' .format (
1853
+ self .probackup_path , backup_dir , 'node' ).replace ("\\ " ,"\\ \\ " )
1854
+ else :
1855
+ self .assertTrue (False , 'Unexpected os family' )
1856
+
1850
1857
self .set_auto_conf (
1851
1858
node ,
1852
1859
{'archive_command' : archive_command })
@@ -1892,7 +1899,7 @@ def test_intermediate_archiving(self):
1892
1899
if os .name == 'posix' :
1893
1900
self .set_archiving (backup_dir , 'node' , node , custom_archive_command = 'cp -v %p {0}/%f' .format (wal_dir ))
1894
1901
elif os .name == 'nt' :
1895
- self .set_archiving (backup_dir , 'node' , node , custom_archive_command = 'xcopy /F "%p" "{0}\\ %f"' .format (wal_dir .replace ("\\ " ,"\\ \\ " )))
1902
+ self .set_archiving (backup_dir , 'node' , node , custom_archive_command = 'copy /Y "%p" "{0}\\ \\ %f"' .format (wal_dir .replace ("\\ " ,"\\ \\ " )))
1896
1903
else :
1897
1904
self .assertTrue (False , 'Unexpected os family' )
1898
1905
0 commit comments