question

Alexsem avatar image
0 Votes"
Alexsem asked NavtejSaini-MSFT commented

Is there a way to know when a database was restored or created in postgre DBaaS?

Just that. I am trying to find a specific way, through the console, or with a query or the shell that would allow me to know if a database was restored accordingly. We have an automated process that restores from one environment to the other.

I have tried queries like SELECT (pg_stat_file('base/'||oid ||'/PG_VERSION')).modification, datname FROM pg_database (which doesn't exactly give the restored date) but obviously I don't have access to this information on a DBaaS.

Is there any other way to do this in postgre for azure?

I have also tried the command az postgres db show but it doesn't show what I need.

azure-database-postgresql
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@alexsem

We are trying to find this information. We will get back to as soon as possible.

Thanks
Navtej S

0 Votes 0 ·

Please let us know if you need any further help.

0 Votes 0 ·

1 Answer

NavtejSaini-MSFT avatar image
0 Votes"
NavtejSaini-MSFT answered NavtejSaini-MSFT edited

Hi @alexsem We PITR’d one server and looked at the errorlog through portal and it shows the following info indicating the time when restore was complete and it got restarted


2020-06-10 21:39:51 UTC-5ee15325.24-LOG: listening on IPv4 address "0.0.0.0", port 20125


2020-06-10 21:39:51 UTC-5ee15325.24-LOG: database system is ready to accept connections


Hope this helps.


Thanks Navtej S


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.