0

Version: Postgres 9.6 (Windows)

I am attempting to do a pg_basebackup but I receive the following error

PS C:\Program Files\PostgreSQL\9.6\bin> .\pg_basebackup -h 192.168.0.185 -Fp -D D:\pg-test\ -P -U postgres -Xs
pg_basebackup: could not open transaction log file "D:\pg-test\/pg_xlog/000000010000000000000002": No such file or directory
52189/52189 kB (100%), 1/1 tablespace
pg_basebackup: child thread exited with error 1

I attempted to start the server (standalone mode) but receive the following error in log file

2021-07-20 12:04:22 CAT LOG:  database system was interrupted; last known up at 2021-07-20 11:51:32 CAT
2021-07-20 12:04:23 CAT FATAL:  the database system is starting up
2021-07-20 12:04:24 CAT FATAL:  the database system is starting up
2021-07-20 12:04:25 CAT FATAL:  the database system is starting up
2021-07-20 12:04:26 CAT FATAL:  the database system is starting up
2021-07-20 12:04:27 CAT FATAL:  the database system is starting up
2021-07-20 12:04:28 CAT FATAL:  the database system is starting up
2021-07-20 12:04:29 CAT FATAL:  the database system is starting up
2021-07-20 12:04:30 CAT LOG:  invalid checkpoint record
2021-07-20 12:04:30 CAT FATAL:  could not locate required checkpoint record
2021-07-20 12:04:30 CAT HINT:  If you are not restoring from a backup, try removing the file "C:/Program Files/PostgreSQL/9.6/data/backup_label".
2021-07-20 12:04:30 CAT LOG:  startup process (PID 1172) exited with exit code 1
2021-07-20 12:04:30 CAT LOG:  aborting startup due to startup process failure
2021-07-20 12:04:30 CAT LOG:  database system is shut down

1 Answer 1

1

The problem was my file path. Even though its a windows host I needed to specify the directory as D:/pg-test/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.