1753776 Members
7428 Online
108799 Solutions
New Discussion юеВ

Re: Migrate all settings and entire database to new platform

 
SOLVED
Go to solution
dasi66
Frequent Advisor

Migrate all settings and entire database to new platform

I know there is an option to export/import hosts, but as we have so many hosts more than 800 hosts in two different systems and special settings, users, usergroups and the most severe, a lot of topology views with a lot of subviews. I Would really appreciate if there is a solotion for this? Otherwise i would have to spend weeks to restore all the old settings. Can anyone give a walkthrough for this issue? I need to do this because the current platforms runs on RH6. Not supported or possible to upgrade anymore from 7.3 E0703.

I tried to backup database from the old system but the new platform refuse to restore other than "it's own" backup. iMC cannot restore exported topology setting from imported hosts either on to a new platform or am I wrong?

I use the same db version and the same iMC release.  I personally think this is a really critical issue for iMC as a manageble platform. It should be possible to solve or..?

10 REPLIES 10
jguse
HPE Pro

Re: Migrate all settings and entire database to new platform

Hello,

It should only be a matter of renaming the old backup files to match the naming of a backup from the new system. Please check the Linux Migration Guide included in the manual folder of the E0703 download under "Restoring the database", it demonstrates how this can be done. Then you should be able to restore everything on your new system

Best regards,
Justin

Working @ HPE
Accept or Kudo
dasi66
Frequent Advisor

Re: Migrate all settings and entire database to new platform

OK, tried that but getting errors, any idas?

 

2019-06-23 17:09:30 [DEBUG] [My_Accept_Handler::handle_input] Connection established 127.0.0.1
2019-06-23 17:09:30 [DEBUG] [CDataConnStreamQueueT::deal_msg] Receive command code: 10000
2019-06-23 17:09:30 [DEBUG] [CDataConnStreamQueueT::deal_msg] Succeed to create SendBakConfigFileReq thread
2019-06-23 17:09:30 [INFO] [SendBakConfigFileReq] Reload config from file: /opt/iMC/dbman/etc/dbman.conf
2019-06-23 17:09:30 [INFO] [Client::connect_to_server] Starting connect to 127.0.0.1: 2810
2019-06-23 17:09:30 [DEBUG] [My_Accept_Handler::handle_input] Connection established 127.0.0.1
2019-06-23 17:09:30 [INFO] [Client::connect_to_server] Established connection to 127.0.0.1: 2810
2019-06-23 17:09:30 [DEBUG] [CDataConnStreamQueueT::deal_msg] Receive command code: 10020
2019-06-23 17:09:30 [DEBUG] [CDataConnStreamQueueT::deal_msg] Success to create directory: /root/Backup
2019-06-23 17:09:30 [INFO] [Client::connect_to_server] Starting connect to 127.0.0.1: 2810
2019-06-23 17:09:30 [DEBUG] [My_Accept_Handler::handle_input] Connection established 127.0.0.1
2019-06-23 17:09:30 [INFO] [Client::connect_to_server] Established connection to 127.0.0.1: 2810
2019-06-23 17:09:30 [DEBUG] [CDataConnStreamQueueT::deal_msg] Receive command code: 10020
2019-06-23 17:09:30 [DEBUG] [CDataConnStreamQueueT::deal_msg] Success to create directory: /opt/dbmanrestore
2019-06-23 17:09:30 [INFO] [Client::connect_to_server] Starting connect to 127.0.0.1: 2810
2019-06-23 17:09:30 [DEBUG] [My_Accept_Handler::handle_input] Connection established 127.0.0.1
2019-06-23 17:09:30 [INFO] [Client::connect_to_server] Established connection to 127.0.0.1: 2810
2019-06-23 17:09:30 [DEBUG] [CDataConnStreamQueueT::deal_msg] Receive command code: 10020
2019-06-23 17:09:30 [DEBUG] [CDataConnStreamQueueT::deal_msg] Success to create directory: /root/Backup
2019-06-23 17:09:30 [INFO] [Client::connect_to_server] Starting connect to 127.0.0.1: 2810
2019-06-23 17:09:30 [DEBUG] [My_Accept_Handler::handle_input] Connection established 127.0.0.1
2019-06-23 17:09:30 [INFO] [Client::connect_to_server] Established connection to 127.0.0.1: 2810
2019-06-23 17:09:30 [DEBUG] [CDataConnStreamQueueT::deal_msg] Receive command code: 10020
2019-06-23 17:09:30 [DEBUG] [CDataConnStreamQueueT::deal_msg] Success to create directory: /opt/dbmanrestore
2019-06-23 17:09:36 [DEBUG] [My_Accept_Handler::handle_input] Connection established 127.0.0.1
2019-06-23 17:09:36 [DEBUG] [CDataConnStreamQueueT::deal_msg] Receive command code: 10003
2019-06-23 17:09:36 [DEBUG] [CDataConnStreamQueueT::deal_msg] Succeed to create ManualRestoreBase thread
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] All server echo ok
2019-06-23 17:09:36 [DEBUG] [ManualRestoreBase] Manual restore type: 0
2019-06-23 17:09:36 [DEBUG] [ManualRestoreBase] IfRestart imc 0
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/127.0.0.1@aclm_db_imc_aclm_db_20190623_165004_full.db
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] FileDir: /root/Backup; StrfileName: 127.0.0.1@aclm_db_imc_aclm_db_20190623_165004_full.db; FileLen: 837397
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/127.0.0.1@config_db_imc_config_db_20190623_165004_full.db
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] FileDir: /root/Backup; StrfileName: 127.0.0.1@config_db_imc_config_db_20190623_165004_full.db; FileLen: 34841825
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/127.0.0.1@icc_db_imc_icc_db_20190623_165004_full.db
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] FileDir: /root/Backup; StrfileName: 127.0.0.1@icc_db_imc_icc_db_20190623_165004_full.db; FileLen: 556249
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/127.0.0.1@invent_db_imc_inventory_db_20190623_165004_full.db
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] FileDir: /root/Backup; StrfileName: 127.0.0.1@invent_db_imc_inventory_db_20190623_165004_full.db; FileLen: 11043084
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/127.0.0.1@monitor_db_imc_monitor_db_20190623_165004_full.db
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] FileDir: /root/Backup; StrfileName: 127.0.0.1@monitor_db_imc_monitor_db_20190623_165004_full.db; FileLen: 7313170
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/127.0.0.1@perf_db_imc_perf_db_20190623_165004_full.db
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] FileDir: /root/Backup; StrfileName: 127.0.0.1@perf_db_imc_perf_db_20190623_165004_full.db; FileLen: 919076185
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/127.0.0.1@reportplat_db_reportplat_db_20190623_165004_full.db
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] FileDir: /root/Backup; StrfileName: 127.0.0.1@reportplat_db_reportplat_db_20190623_165004_full.db; FileLen: 144085
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/127.0.0.1@syslog_db_imc_syslog_db_20190623_165004_full.db
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] FileDir: /root/Backup; StrfileName: 127.0.0.1@syslog_db_imc_syslog_db_20190623_165004_full.db; FileLen: 114122
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/127.0.0.1@vlanm_db_imc_vlan_db_20190623_165004_full.db
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] FileDir: /root/Backup; StrfileName: 127.0.0.1@vlanm_db_imc_vlan_db_20190623_165004_full.db; FileLen: 2237694
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/127.0.0.1@vnm_db_imc_vnm_db_20190623_165004_full.db
2019-06-23 17:09:36 [INFO] [ManualRestoreBase] FileDir: /root/Backup; StrfileName: 127.0.0.1@vnm_db_imc_vnm_db_20190623_165004_full.db; FileLen: 42073
2019-06-23 17:09:36 [ERROR] [checkDBFiles] Restore all database failed: Components is not match
019-06-23 17:09:36 [ERROR] [checkDBFiles] Database: 127.0.0.1@aclm_db. Components: iMC-ACLM=7.3.E0605P06
2019-06-23 17:09:36 [ERROR] [checkDBFiles] DbFileConf: 127.0.0.1@aclm_db_imc_aclm_db_20190623_165004_full.db. Components: iMC-ACLM=7.3.E0605P06
2019-06-23 17:09:36 [INFO] [sendTrapAlert] Send trap success

2019-06-23 17:09:36 [ERROR] [ManualRestoreBase] Fail to check DB file.
2019-06-23 17:09:36 [ERROR] [response_err_code] errCode = -1

jguse
HPE Pro

Re: Migrate all settings and entire database to new platform

Hello,

The error is:

2019-06-23 17:09:36 [ERROR] [checkDBFiles] Restore all database failed: Components is not match

Which means that the components of IMC that were deployed when the backup was taken are not exactly the same as the components currently deployed on the system to which you are restoring. The components and their versions must be an exact match between both systems.

To figure out what doesn't match, compare the dbman.....conf file included in your original backup, and the one in the backup you took from the new system (it can be opened with a text editor). The components and their versions listed there must match.

In your case it looks from the error details like the issue is with aclm_db you are trying to restore. Could it be that this component is not deployed on your new system, or that the version on which you performed the backup was outdated?

You could fix it by either:

a) Undeploying or Deploying components on your current IMC system to match those in the backup

OR

b) Editing the backup's dbman....conf file to remove the reference to the non-matching component (aclm_db), saving it and then restoring all DBs except the one you removed from there.

Hope that helps.

Best regards,
Justin

Working @ HPE
Accept or Kudo
dasi66
Frequent Advisor

Re: Migrate all settings and entire database to new platform

Everything is exactly the same on both machines. Same Linux version, same db version

dbman..conf exatly the same

same components deployed

It's not aclm_db. It shows the same errors for all db's if i for example only choose icc_db I get the same error there:

019-06-23 21:35:50 [DEBUG] [My_Accept_Handler::handle_input] Connection established 127.0.0.1
2019-06-23 21:35:50 [DEBUG] [CDataConnStreamQueueT::deal_msg] Receive command code: 10003
2019-06-23 21:35:50 [DEBUG] [CDataConnStreamQueueT::deal_msg] Succeed to create ManualRestoreBase thread
2019-06-23 21:35:50 [INFO] [ManualRestoreBase] All server echo ok
2019-06-23 21:35:50 [DEBUG] [ManualRestoreBase] Manual restore type: 0
2019-06-23 21:35:50 [DEBUG] [ManualRestoreBase] IfRestart imc 0
2019-06-23 21:35:50 [INFO] [ManualRestoreBase] Restore file list: /root/Backup/new/127.0.0.1@icc_db_imc_icc_db_20190623_183601_full.db
2019-06-23 21:35:50 [INFO] [ManualRestoreBase] FileDir: /root/Backup/new; StrfileName: 127.0.0.1@icc_db_imc_icc_db_20190623_183601_full.db; FileLen: 556249
2019-06-23 21:35:50 [ERROR] [checkDBFiles] Restore all database failed: Components is not match
019-06-23 21:35:50 [ERROR] [checkDBFiles] Database: 127.0.0.1@icc_db. Components: iMC-ICC=7.3.E0605P06
2019-06-23 21:35:50 [ERROR] [checkDBFiles] DbFileConf: 127.0.0.1@icc_db_imc_icc_db_20190623_183601_full.db. Components: iMC-ICC=7.3.E0605P06
2019-06-23 21:35:50 [INFO] [sendTrapAlert] Send trap success

2019-06-23 21:35:50 [ERROR] [ManualRestoreBase] Fail to check DB file.
2019-06-23 21:35:50 [ERROR] [response_err_code] errCode = -1

jguse
HPE Pro

Re: Migrate all settings and entire database to new platform

Hello,

Could it be that you are trying to restore a DB backup from IMC 7.3 E0605P06 to an IMC 7.3 E0703 system?

What I meant by "The components and their versions must be an exact match" is that the IMC version must match. In other words, if you want to restore an E0605P06 backup, your current system must also be running that version.

If my assumption above is correct, then you would need to uninstall IMC 7.3 E0703 on the new system, install IMC 7.3 E0605 instead, upgrade it to P06, restore your DB backup from the old system, and then upgrade to 7.3 E0703.

Best regards,
Justin

Working @ HPE
Accept or Kudo
dasi66
Frequent Advisor

Re: Migrate all settings and entire database to new platform

Hi, no both systems are iMC PLAT 7.3 (E0605P06)

dasi66
Frequent Advisor

Re: Migrate all settings and entire database to new platform

Anyone have an idea?

 

dasi66
Frequent Advisor
Solution

Re: Migrate all settings and entire database to new platform

Soved it !

Do not copy end rename all files from old to new machine as said in HPE IMC Linux Migration Guide

Omit theese files and it works as it should:

db_catalog_20190624_141359.dat

db_catalog_20190624_141359.dat.ok

dbman_20190624_141359.conf

Copy all other .db and .zip and rename the date_time as in backup taken in new machine and it works like charm.

 

jguse
HPE Pro

Re: Migrate all settings and entire database to new platform

Sorry I am out of office these days and not always checking up here, but I'm happy to see you solved it. I'll have a look in the lab when I'm back and see if I can figure out why these files were causing issues, maybe we need to correct the guide.

Thanks for sharing the solution as well!

Best regards,
Justin

Working @ HPE
Accept or Kudo