Pg_basebackup not backing pg_control file.
We are using posgresql 9.3 and our backup took 90 hours. Seems all the files except pg_control file from the global directory.
Any help is appreciated.
Unfortunately, 9.3 is rather old. The only thing I would suggest is to verify the ownership and permissions of pg_control file, but I suspect that might not be the issue.
I’d suggest checking the logs and make sure that there are no disconnections. pg_control file is copied at the end. Perhaps, the connection broke and hence the file wasn’t copied.
If the logs don’t help then one hard core way to debug this issue will be to strace the database walsender process that handles the backup and see what’s going on.
My issue is similar to what was posted to start this topic, though with a difference that the pg_basebackup copied over only a set of files/folders from master in my case. Specifically, below are files copied over from the master -
pg_hba.conf
backup_label
pg_stat_tmp
base
pg_xlog
pg_snapshots
global
pg_multixact
postgresql.conf
Is this expected ? Since there are a bunch of other files/folders in the data directory on the master which were not copied over. For ex - pg_notify, pg_subtrans, pg_ident.conf, pg_tblspc, pg_stat etc were not copied over and without these the DB doesn’t come up.
Of course, did not copy over the pg_control file as well even though the global folder was copied. Due to this the DB start command fails without any detailed information.
Any specific help is appreciated.