Issue
How to migrate ebo_db from an old PostgreSQL/TimescaleDB PC to a new PostgreSQL/TimescaleDB PC
Product Line
EcoStruxure Building Operation
Environment
- PostgreSQL
- TimescaleDB
- pgAdmin
- Building Operation Workstation
Cause
When using External log Storage (the TimescaleDB in PostgreSQL server) in EcoStruxure Building Operation, it is often required to migrate the TimescaleDB (ebo_db) to a new PC or a different HDD due to the hard-disk space issue.
Resolution
- Stop the External Log Storage (TimescaleDB) from all the EBO servers (ES & AS’s).
- Using the attached zip file, extract the XML TimescaleDB Search Export and import this to the root location of your server.
- The resulting search results will provide ALL servers' Timescale objects and show the status of the Event and Trend configurations. allowing you to multi-select and change the Event and Trend configuration settings quickly. Use the CRTL key to only select the relevant servers. Alternatively, follow the steps below to locate these properties manually.
Note the Export is for version 3.2.3
- The resulting search results will provide ALL servers' Timescale objects and show the status of the Event and Trend configurations. allowing you to multi-select and change the Event and Trend configuration settings quickly. Use the CRTL key to only select the relevant servers. Alternatively, follow the steps below to locate these properties manually.
- Expand the ES Server, expand the System folder, and expand the External Log Storage folder.
- Right-click the TimescaleDB and select the Properties.
- Disable the Event Configuration & Trend Configuration and save.
- Repeat the above operation for all the other servers (AS’s) that are enabled for the External Log Storage.
- Create a new database in the destination External Log Storage server PC using the “EBO External Log Storage Installer” tool.
- Refer to page 5 “Database Management” section of the “EBO External Log Storage Installer.pdf” document for detail.
- Backup the “ebo_db” from the source TimescaleDB server PC using the pgAdmin 4 (refer to https://www.pgadmin.org/docs/pgadmin4/development/backup_dialog.html ), or refer to page 8 “Backup” section of the “EBO External Log Storage Installer.pdf” document for detail.
- Copy the DB backup file to the destination TimescaleDB server PC and restore the database using the pgAdmin4 tool (refer to https://www.pgadmin.org/docs/pgadmin4/development/restore_dialog.html ).
- DB Restoration may take a couple of minutes to a couple of hours depending on the size of the database.
- DB restoration results may show an error caused by pre-existing information in some tables, but it can be ignored.
- Once DB restoration is completed, make sure to check the timestamp of the oldest log data and the latest log data to verify the result.
- Start the External Log Storage (TimescaleDB) from all the EBO servers (ES & AS’s) using the search provided in Step 1 or manually as follows:
- Expand the ES Server, expand the System folder, and expand the External Log Storage folder.
- Right-click the TimescaleDB and select the Properties.
- Change the Database name, Host address, User name, and Password for the new (destination) External Log Storage server PC
- Enable the Event Configuration & Trend Configuration and save.
- Repeat the above operation for all the other servers (AS’s) that were disabled in the above step 1.