Prerequisites
* Back up the current ALL-in-One Server/DB.
* Avoid having users making any changes. (Perform off-peak hours)
* Install PostgreSQL Server on the new target server. (https://www.postgresql.org/download/windows/). Please use PostgreSQL 12.
* Install PGAdmin on CentreStack server and target database server.
Note: At this time of this documentation, PostgreSQL server 13 will be used for this article.
Sections:
1) Configuring the Target Database Server's Firewall
2) Configure target database server for remote connection
3) Verify connection from the CentreStack server
Configuring the Target Database Server's Firewall
1) On the target Postgre database server, launch Windows Defender Firewall.
2) Select Advanced settings.
3) Select Inbound Rules >> New Rule and select Port.
4) On the Protocols and Ports, enter the designated port number, then select Next.
For this example, the default 5432 port will be used.
5) Leave the defaults for the Action and Profile screens, and provide a name for the rule on the Name screen, then select Finish.
Configure target database server for remote connection
The pg_hba.conf needs to be configured to allow remote connections to the database server. For this, we need to stop the postgresql service to modify the connection configuration file to enable remote management.
1) On the target Postgre database server, Stop the Postgresql service from the task manager.
2) Modify the pg_hba.conf file (Default installation path: "C:\Program Files\PostgreSQL\13\data") to allow remote connections from the CentreStack server.
Tip: Just copy and paste the first line under IPv4 local connections and replace the 127.0.0.1/32 IP Address with the CentreStack server's IP address and change the authentication method to "trust".
3) Under Connections and Authentication, verify that the PostgreSQL.conf file contains the listen_addresses = '*' entry.
4) Start the PostgreSQL service.
Verify connection from the CentreStack server
1) On the CentreStack server, Add a new server via pgAdmin to ensure you can connect to the target database.
2) Under General, provide a name for the connection, supply the authentication information under the Connection tab, then click on save.
3) If everything works correctly, it should connect you to the remote database. From here, we can proceed with migrating the DB.
Begin the Migration
1) On the CentreStack server, navigate to http://localhost/management/migratedatabase.aspx. Select PostgreSQL from the dropdown, then select MIGRATE.
2) Enter the Hostname or IP address, port number, database name, username, and password.
Note: The database does not need to exist in the target database server, but if it does, it will prompt for confirmation.
3) The process screen will appear on the following screen.
4) Successful Migration.
5) Restart the Gladinet Cloud Monitoring service.
6) Sign in as the Cluster Administrator, and query the xaf_audit table on the new database to ensure that the audit records are being created.
7) On the CentreStack Server, Stop the gladpostgresrv service and set it to Manual.
Comments
0 comments
Please sign in to leave a comment.