Skip to content

Commit 6832cbb

Browse files
committed
Replaced the backslash in the path to the backup
1 parent ac98fef commit 6832cbb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/restore.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,14 @@ create_recovery_conf(time_t backup_id,
787787

788788
fprintf(fp, "# recovery.conf generated by pg_probackup %s\n",
789789
PROGRAM_VERSION);
790+
#ifdef WIN32
791+
char *p1 = backup_path;
792+
while (*p1){
793+
if ((*p1) == '\\')
794+
*p1 = '/';
795+
p1++;
796+
}
797+
#endif
790798
fprintf(fp, "restore_command = '%s archive-get -B %s --instance %s --wal-file-path %%p --wal-file-name %%f'\n",
791799
PROGRAM_NAME, backup_path, instance_name);
792800
fprintf(fp, "recovery_target_action = 'promote'\n");

0 commit comments

Comments
 (0)