There maybe a time where you want to replace or restore a running Opscenter instance. This could be due to a hardware upgrade or other maintenance event. This article provides instructions for migrating Opscenter settings and/or data from one server to another.
NOTE - Make sure you have set the permissions correctly once you copy any files noted in the below instructions.
- OpsCenter 5.2, 6.0, 6.1
Here are a list of components that we will be covering:
- Restoring backup job schedules
- Configuration files
Dashboard / Widgets
You can import/export your dashboard/widget settings using the following link --> https://docs.datastax.com/en/opscenter/6.1/opsc/online_help/exportImportDashboardPresets.html
The steps are very straight forward, Once you enable the following in your opscenterd.conf file you can export/import your dashboard settings.
[labs] enable_dashboard_preset_import_export = True
Essentially export your current settings and import into the new Opscenter instance to recover your widgets and dashboard settings.
Opscenter metrics data is not stored on the Opscenter Instance. Metrics data is stored in the pdp and rollups* tables on each node in the cluster and no export/import is required.
If you’re using Opscenter authentication, you can also export/import the SQLite DB file (passwd.db) located on the Opscenter instance
When moving/replacing/restoring your Opscenter instance and you have Opscenter authentication enabled you need to copy the passwd.db to the new Opscenter instance.
The default location for the passwd.db file is /etc/opscenter/passwd.db
The password database is created when authentication is enabled. Change the location of the password database in the opscenterd.conf file if required.
See here for more information --> https://docs.datastax.com/en/opscenter/6.1/opsc/configure/opscAuthChangePasswordDatabase.html
When you take backups and perform repairs you build metadata that Opscenter uses to track the history. You need to restore this to the new Opscenter instance so all previous history is maintained.
This information is stored in JSON files on the Opscenter instance.
To do this you also need to backup/restore/copy the JSON files in the persist_directory located on the Opscenter node to the new instance
To restore just copy back the contents of the above directory to the same location on the new Opscenter instance.
Restoring backup job schedules and backup data
OpsCenter tracks all current in-process and completed backup and restore operations. The first time the Backup Service starts, it scans for existing backups and populates the backup_reports table. If there is no backup activity, or OpsCenter was recently upgraded or replaced, the Activity page indicates there is not any backup activity available at this time.
You will also need to review the following link to get your backups jobs/schedules restored --> https://docs.datastax.com/en/opscenter/6.1/opsc/online_help/services/syncBackupData.html
* Also note your backup configuration files are located under the conf/<cluster_name>.conf directories on your Opscenter instance, copy these files to the new instance so your previous backup configurations are maintained.
It’s recommended to back up all the configuration files noted in the below doc link --> https://docs.datastax.com/en/opscenter/6.1/opsc/configure/opscConfigFiles.html
You essentially would restore these to the same location prior to starting the new instance.
To export alerts from Opscenter you need to perform a GET operation via curl and save the output so we can restore these alerts using the import method which uses a POST operation
Exporting configured alerts in Opscenter -> https://docs.datastax.com/en/opscenter/6.1/api/docs/events_alerts.html#method-get-alert-rules
Importing alerts into Opscenter --> https://docs.datastax.com/en/opscenter/6.1/api/docs/events_alerts.html#method-create-alert-rule
Lifecycle Cluster Manager (LCM)
Please review the following KB article which outlines the steps needed to clone the LCM configuration files if you are using LCM in your environment.
It’s a very good idea to clone an existing configuration profile within Lifecycle Manager for a number of reasons:
- in order to update the DSE version during manual upgrades you need to clone the configuration files and restore them
- it can also be useful when creating variations of an existing config when you don’t want to modify the original.
Support for graphically cloning configuration profiles is planned in OPSC-6428, but in the meantime it must be done manually.
Lifecycle Manager: Cloning Configuration Profiles --> https://support.datastax.com/hc/en-us/articles/212267063