Skip to main content

Hello,

This is our first foray into Commvault-PostGres, so please be gentle. 

I have a development Linux host with 2 postgres instances in commvault, host1 and host1_5444.  They both appear to be backing up correctly without issue.

Through the GUI, I’m attempting to do an out of place restore on the same host, restoring host1 instance to the host1_5444 instance.  The restore says it completes, but host1_5444 instance is missing a database from host1 instance.

After the restore, the source instance host1 instance is down.  Commvault modified it’s postgresql.conf as such:

:postgres@<myhost>data]$ diff postgresql.conf postgresql.conf.BEFORERESTORE
682,688c682
< port = 5444
<
< restore_command = 'cp /var/lib/pgsql/archivedir2/%f %p'
< recovery_end_command = 'touch \'/var/lib/pgsql/14/data/recovery.done.cv\' && mv -f \'/var/lib/pgsql/14/data/postgresql.conf\' \'/var/lib/pgsql/14/data/postgresql.conf.with_recovery_commands\' && mv -f \'/var/lib/pgsql/14/data/postgresql.conf.without_recovery_command\' \'/var/lib/pgsql/14/data/postgresql.conf\' && cp \'/var/lib/pgsql/14/data/postgresql.conf\' \'/var/lib/pgsql/14/data/postgresql.conf.without_recovery_command\' && chown 26:26 \'/var/lib/pgsql/14/data/postgresql.conf\''
< recovery_target_timeline = 'current'
< recovery_target_time = '2024-01-31 20:52:03GMT'
< recovery_target_action = promote
---
> port = 5432

Why would commvault update the postgresql.conf on the source instance?  I’m thinking it might be grabbing some environmental variable that’s screwing it up, but I’m not sure where I’d start looking.

Secondly, and this is totally separate from the above but including here as I may be wrong, when doing a normal restore/recovery in place, we have to comment out the #recovery_target_time to get the instance to start, and have had to run pg_resetwal command as well.

Thanks!

Hi Chris,

Restoring One or More PostgreSQL Databases (commvault.com)

Note

For FSBased backup set, it is assumed that the data directory path and tablespace location in the source and the destination clients are the same. If they are different, then redirect the data directory to a different path by performing a redirect restore operation.


This 100%, thank you Meera!!!!


Reply