@Ihtisham Mushtaq
Thank you for the question and for using Microsoft Q&A platform.
As per my understanding, you are trying to migrate your Azure Database for PostgreSQL from Single Server to Flexible Server.
- Ensure your source PostgreSQL version is 9.5 or higher. Confirm that the source server can communicate with the target Flexible Server. Check and enable necessary extensions on both the source and target servers.
- Set up your Azure Database for PostgreSQL Flexible Server with appropriate specifications. Allocate sufficient storage, typically 1.25 times the current usage.
- Stop applications from writing to the database during migration to prevent data loss. Stop applications from writing to the database during migration to prevent data loss. Use the Azure portal or CLI to monitor the migration process.
- Run the premigration validation before you perform a migration. You can use the Validate and Validate and Migrate options on the migration Setup page. Premigration validation conducts thorough checks against a predefined rule set.
- Complete the migration within the allowed timeframe. Each migration has a maximum lifetime of seven days (168 hours) after it starts, and it times out after seven days. You can complete your migration and application cutover after the data validation and all checks are complete to avoid the migration from timing out.
- Optimize the Flexible Server configuration for performance, including adjusting memory and connection settings.
By following these steps and best practices, you can ensure a successful migration from Single Server to Flexible Server in Azure Database for PostgreSQL.
You can also refer to the below links for more help:
https://learn.microsoft.com/en-us/azure/postgresql/migrate/migration-service/tutorial-migration-service-single-to-flexible?tabs=portal%2Coffline
https://learn.microsoft.com/en-us/azure/postgresql/migrate/migration-service/best-practices-migration-service-postgresql
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.