I'm going thru the various online processes to expand the pg_basebackup tar file into the C:\Program Files\PostgreSQL15円\data, such as Restore data from tar file for unix, but when restoring on windows I start the postgrsql windows service it immediately fails with The PostgreSQL-x64-15 service on Local Computer Started and then Stopped
I suspect that the files in the tar do not have the proper ownership/permissions, while the instructions are clear for changing ownership on unix, its unclear which ownership/permissions are required on windows.
With a clean PostgresSQL install, the data directory has granted access to 'ALL APPLICATION PACKAGES' and 'ALL RESTRICTED APPLICATION PACKAGES' but I can't seem to apply the permissions for 'ALL RESTRICTED APPLICATION PACKAGES' on the files on the files expanded from the tar file moved into the data directory. Advice?
Note the database that created the backup file has TimescaleDB installed, as does the clean install on the new machine.
note the service creates a log file in \Program Files\PostgreSQL15円\data\logs, but its always empty. So it seems to have some rights into the directory.
-
Maybe it has permission to create the file but not write to it, which is why it is empty? What if you try to start it from the command line?jjanes– jjanes2024年06月17日 17:45:54 +00:00Commented Jun 17, 2024 at 17:45
1 Answer 1
The issue was twofold, leaving here in case it helps anyone else.
First, I had a docker container running a timescale instance that was occupying the port that was used where the backup was taken. Editing postgres.config that was copied from the source to the target machine, to use the port of the target machine's install was required.
Second, the lib directory of the target had a slightly newer version of timescale (2.15.2) where the source system had 2.15.1. Backdating the target allowed the database restore to complete correctly. W00t.