@schmandforke we’ve finished verifying the following procedures to migrate a capablanca DB to darga:
Capablanca to Darga
- Backup the PostgreSQL Database on your Capablanca Appliance.
pg_dump --format custom --file ~/db_backup.cpgd vmdb_production --verbose
If the console output indicates that there are other connections active, then terminate postgresql, wait a few minutes, and restart the service. To terminate, type
service postgresql stop
To initiate,
service postgresql start
Wait one minute for postgres to start, and then retry the backup process.
-
Create a Darga Appliance - make sure that it has connectivity to your Capablanca Appliance.
-
In the next set of commands, you will stop the MIQ Service, drop the default database, copy the backup and guid files from the Capablanca Appliance, recreate an empty database, and restore the Capablanca database to the Darga appliance. Substitute the IP address of your Capablanca Appliance as noted. Run the following commands on the Darga appliance:
systemctl stop evmserverd
dropdb vmdb_production
scp root@$ipofcapa_appliance:~/db_backup.cpgd ~/
scp root@$ipofcapa_appliance:/var/www/miq/vmdb/GUID /var/www/miq/vmdb/
createdb vmdb_production
pg_restore --dbname=vmdb_production ~/db_backup.cpgd --verbose
- After the restore is finished, you will need to rake the restored capablanca database to bring it up to the Darga level, stop the ManageIQ Service, update the ManageIQ Automate Domain, and start the ManageIQ Service. This may affect any custom automation workflows that you created. Be sure to test them thoroughly before putting them into production environments. Run the following commands on the Darga appliance:
vmdb
rake db:migrate
bin/rails r tools/purge_duplicate_rubyrep_triggers.rb
systemctl start evmserverd
rake evm:automate:reset
systemctl restart evmserverd
- Open the configuration screen, in command prompt, type:
appliance_console
-
Press Enter until you are at the Advanced Setting menu.
-
Select the option to Generate Custom Encryption Key (11).
Follow the prompts to fetch the key from the Capablanca Appliance
Follow the prompts for VMDB location.
Use the same Region number as the Capablanca VMDB Appliance.
systemctl restart evmserverd
-
Allow the appliance to start.
-
Wait about 5 minutes until you can access the Web-based User Interface.
-
Verify your database items have been migrated successfully.