This topic contains all the migration related information to achieve HA and DR on Cisco IoT FND with Postgres.
Migrate Influx DB to Postgres
This document provides a step-by-step guide for migrating time-series data (events and metrics) from InfluxDB to Postgres within the Cisco IoT FND environment. The current version of the FND is 5.1.0-155 is used for the Influx DB to Postgres migration.
Historically, Cisco IoT FND used Influx DB as a specialized time-series database to handle high volumes of events and performance metrics. Starting Cisco IoT FND Release 5.1.1, Cisco IoT FND consolidates this data into PostgreSQL to simplify the database architecture and management.
Before you begin
-
Ensure the following CPU and Memory configuration for Cisco IoT FND. Here's an example configuration for Cisco IoT FND running 50,000 routers:
Configuration
Value
CPU Cores
24
Sockets
6
Core per Socket
4
IOMMU
Disabled
Memory
96 GB
-
In the Data Retention page, configure the following values:
Based on the image provided, here are the Data Retention settings in a tabular format:
Field Value (days) Keep Event data for 7 Keep Firmware Operation data for 7 Keep Historical Dashboard data for 7 Keep Dashboard data for 7 Keep Closed Issues data for 7 Keep JobEngine data for 7 Keep Historical Metrics Statistics for 30 Keep Device Network Statistics for 7 Keep Open Issues data for 7 Keep Service Provider down routers data for 7 -
Disable the data retention in Influx DB using the
influxdb.confscript. Here's an example:$ vim /etc/influxdb/influxdb.conf [retention] # Determines whether retention policy enforcement enabled. enabled = false $ Restart the influxdb service - systemctl restart influxdb.service -
Run
du -sh /var/lib/influxdb/data/fnd/to confirm the total volume of InfluxDB data (e.g., 25GB) that will be moved to the PostgresDB. -
The Influx DB to Postgres migration process filters events based on current device inventory. Events linked to deleted or decommissioned devices are excluded from the migration scope. For further technical details, refer to CSCwp87487.
-
The following table outlines the specific measurements being migrated from the InfluxDB time-series database to the PostgreSQL relational database:
InfluxDB Table (Source) PostgresDB Table (Destination) eventseventshistoricalnameddatahistorical_named_datahistoricalnameddata_dahistorical_named_data_dahistoricalnameddata_1_hrhistorical_named_data_hrmetricshistorymetrics_historymhistory_1_hrmetrics_history_hrThe migration process is resource-intensive. It is mandatory to monitor system performance from the start of the migration until completion. If you encounter timeout or memory exhaustion issues, you must adjust the thread parameters in the
influx2postgres.propertiesfile.
Use these instructions to modify the influx2postgres.properties file:
Procedure
You've successfully migrated time-series data from InfluxDB to Postgres.
What to do next
Verify the data in the Postgres DB
Procedure
You've successfully verified the data in the Postgres DB after the Influx DB to Postgres migration.
Migrate data from standalone to EDB Postgres
This procedure configures the Cisco IoT FND to connect to an external EDB Postgres database and executes a migration script to transfer the necessary data to the new environment. It subsequently ensures data integrity and operational readiness by performing a complete backup and restore sequence on the database server.
Procedure
You've migrated the data from standalone to EDB Postgres.