An Azure managed PostgreSQL database service for app development and deployment.
Hello @Rafa Lachica Garrido
Thank you for reaching out to Microsoft Q&A. I understand your issue is with PostgreSQL Flexible server backup.
Restore duration for PostgreSQL Flexible Server PITR
This can be normal for a point-in-time restore on Azure Database for PostgreSQL Flexible Server.
Microsoft documents that PITR recovery time usually ranges from a few minutes to a few hours, and it depends mainly on:
- how much transaction log data must be replayed after the last snapshot backup
- the number of databases being recovered
- the restore target and region
For custom/latest restore points, Azure first restores the snapshot backup and then replays WAL/logs to bring the server to the requested time. That log-recovery phase is what usually takes the time.
If your goal is the fastest possible restore, use Restore to full backup (fast restore) or choose a backup timestamp instead of a custom point in time. Fast restore skips log replay and is therefore quicker.
Also, keep in mind that a restore creates a new server; it does not overwrite the existing one. You can monitor the restore operation in the Activity log or under Jobs in the portal.
If the operation is still running after 3 hours, it is worth checking the Activity log to confirm that the restore is progressing. If there is no progress or the restore eventually fails, open a support request with the restore operation details.
I hope this was helpful. Please mark this as an "accepted" answer if you found this helpful and follow me here on Microsoft Q&A. Have a wonderful day!
Best regards,
Andrew Taylor
Reference: Microsoft Learn — Backup and restore in Azure Database for PostgreSQL