If you installed a new QDB and want to maintain existing agents for that QDB, you must migrate the agents to the new QDB. You can migrate version 7.0.2 and version 8.x agents to new QDBs. AppManager 9.x includes a command line tool, MigrateQ.exe, that automates the migration process and allows you to migrate multiple agents simultaneously, if needed. The tool migrates the following agent attributes to the new QDB:
Security Manager settings
Custom properties
Running discovery jobs
Running ad hoc jobs
Running jobs that a custom Knowledge Script started
In addition, the tool sets the primary management server for the agent in the new QDB and performs the following clean-up activities in the source QDB following a successful migration:
Stops all running jobs for the agent
Optionally, deletes the agent
The tool does not migrate data and events to the new QDB.
The tool will not perform a migration in the following situations:
The agent is offline.
The agent is in maintenance mode.
The agent is already present in the destination QDB.
The destination QDB is an earlier version than the source QDB.
To migrate an agent to a new QDB:
Ensure that the agent meets the version requirements for migration.
Ensure that the computer from which you will run the tool meets the following requirements:
The computer can connect to both the source QDB and the destination QDB.
The computer has a version 8.x or 9.x Windows agent installed. Even if you are migrating a version 7.0.2 agent, the computer from which you run the migration tool must meet this requirement.
If you are migrating a UNIX agent, the computer can connect to the UNIX agent computer through Secure Shell (SSH).
(Conditional) If necessary, from the computer where you saved the AppManager 9.x installation files, copy the contents of the Agent Migration folder to the computer where you will run the tool.
Open a command prompt and change directory to the location of the Agent Migration folder.
(Conditional) If you are migrating a Windows agent, type the following command, and then press Enter:
MigrateQ -agent:agent_display_name -source:QDB_computer_name#QDB_name -dest:QDB_computer_name#QDB_name -MS:primary_management_server_name[,secondary_management_server_name] -sauth:{0|1}#[user_name$password] -dauth:{0|1}#[user_name$password] -delete:{0|1}
Sample commands are included at the end of this section.
(Conditional) If you are migrating a UNIX agent, type the following command, and then press Enter:
MigrateQ -agent:agent_display_name -source:QDB_computer_name#QDB_name -dest:QDB_computer_name#QDB_name -MS:primary_management_server_name[,secondary_management_server_name] -sauth:{0|1}#[user_name$password] -dauth:{0|1}#[user_name$password] -delete:{0|1} -uxuser:user_name -uxpassword:password -port:ssh_port_number
Sample commands are included at the end of this section.
The command parameters are as follows:
Parameter |
Description |
---|---|
agent |
Name of the agent you want to migrate, as displayed in the AppManager consoles To specify multiple agents, use a comma to separate the names of the agents. |
source |
Name of the computer where the source QDB is installed and the name of the QDB, separated by # |
dest |
Name of the computer where the destination QDB is installed and the name of the QDB, separated by # |
MS |
Name of the primary management server for the agent, to be set in the destination QDB Optionally, you can specify a secondary management server for the agent. Use a comma to separate the primary and secondary management servers. For example, -MS:MyPrimaryMS,MySecondaryMS. |
sauth |
Whether the source QDB uses Windows or SQL Server authentication For Windows authentication, specify 0. You do not need to provide credentials for Windows authentication. For SQL Server authentication, specify 1 and provide the credentials. For example, -sauth:1#sa$Control123. |
dauth |
Whether the destination QDB uses Windows or SQL Server authentication For Windows authentication, specify 0. You do not need to provide credentials for Windows authentication. For SQL Server authentication, specify 1 and provide the credentials. For example, -sauth:1#sa$Control123. |
delete |
Whether to delete the agent from the source QDB after successful migration To delete the agent, specify 1. To keep the agent, specify 0. |
uxuser |
User name for connecting to the remote UNIX agent Ensure that the user has sudo access. |
uxpassword |
Password for connecting to the remote UNIX agent |
port |
If the SSH server is not using port 22, SSH port number to use to connect to the remote UNIX agent |
Following are sample commands:
For this situation... |
Use this command... |
---|---|
The source and destination QDBs use SQL Server authentication and you do not want to delete the agent from the source QDB |
MigrateQ -agent:MyAgent -source:MySourceQDB#QDB_1 -dest:MyDestQDB\MyDestInstance#QDB_2 -MS:MyManagementServer –sauth:1#sa$Control123 –dauth:1#sa$Control123 –delete:0 |
The source QDB uses SQL Server authentication, the destination QDB uses Windows authentication, and you want to delete the agent from the source QDB |
MigrateQ -agent:MyAgent -source:MySourceQDB#QDB_1 -dest:MyDestQDB\MyDestInstance#QDB_2 -MS:MyManagementServer –sauth:1#sa$Control123 –dauth:0 –delete:1 |
The source and destination QDBs use Windows authentication and you want to delete the agent from the source QDB |
MigrateQ -agent:MyAgent -source:MySourceQDB#QDB_1 -dest:MyDestQDB\MyDestInstance#QDB_2 -MS:MyManagementServerPrimary,MyManagementServerSecondary –sauth:0 –dauth:0 –delete:1 |
You want to migrate multiple agents in one session |
MigrateQ -agent:MyAgent1,MyAgent2,MyAgent3 -source:MySourceQDB#QDB_1 -dest:MyDestQDB\MyDestInstance#QDB_2 -MS:MyManagementServer –sauth:0 –dauth:0 –delete:1 |
The value for a parameter contains special characters (enclose the parameter in quotes) |
MigrateQ -agent:MyAgent "-source:MySourceQDB#QDB123&%" -dest:MyDestQDB\MyDestInstance#QDB_2 -MS:MyManagementServer -sauth:1#sa$Control123 -dauth:1#sa$Control123 -delete:0 |
You are migrating a UNIX agent |
MigrateQ -agent:MyAgent -source:MySourceQDB#QDB_1 -dest:MyDestQDB\MyDestInstance#QDB_2 -MS:MyManagementServerPrimary,MyManagementServerSecondary -sauth:1#sa$Control123 -dauth:1#sa$Control123 -delete:0 -uxuser:sudouser -uxpassword:mypasswd -port:1234 |