Follow

Move devices from one DGE(-X) to another DGEx

Expectations

  • These instructions assume that the the target DGE(-X) contains existing monitored devices with data. It will not be possible to import the existing history of collected data for the device(s) that wish to be moved
  • If target DGE(-X) is completely new, you may be able to retain history/data of the moved device(s) by following https://kaseya.zendesk.com/entries/85850016-Migrating-Moving-Devices-From-an-Old-DGE-to-a-New-DGE
  • Source DGE(-X) and target DGE(-X) are running similar OS type (e.g. Windows vs Linux)
  • During the actual move, source DGE(-X) and target DGE(-X) components will need to be offline
  • BVE needs the 'Provisioning Database' and 'BVE API' components running
  • If dependencies need to be retained, exportAndDeleteDependency.pl and importAndCrateDependency.pl to be placed under \plugin\utils on the BVE (download attached migrations-tools.zip)

Before migrating, we suggest you review the steps below and have attempted on a test environment if possible. In order to move devices from an existing DGE to a new DGE, you may use individual device names or you may use wildcards on the device name. It is strongly recommended that you create a backup of the provisioning database on the BVE and (at least) the "database" directory on the source/target DGEs in case you need to rollback the changes.

 

Device list preparation

Should you need to move devices by individual device names, you can start by creating a list of devices that to be migrated. If you do not have a list of devices handy, you may create one by following these steps:

  • On BVE (make sure the BVE API component is running)
  • Create an empty file named devicelist.txt file and add the following line: device.list "devicename=*"
  • From command line: utils\bveCLI.pl --host localhost --username=superuser --password=SUPERUSERPASSWORD --input=devicelist.txt 'devicename=*'" --format=csv --fields=devicename,dgename --output devicelist.csv

"SUPERUSERPASSWORD" will of course need to be changed to the correct password associated with the superuser account. This command will output all devices provisioned in Traverse, redirected into devicelist.csv. You should be able to open this file with an Excel spreadsheet and sort by the dgename column and delete the unwanted devices (rows) so you are left with only the desired devices from the desired DGE.

 

Migration Steps (commands are run from <TRAVERSE_HOME> on BVE)

  • Backup your BVE and source DGE databases: On BVE and source DGE run: utils\db_backup.cmd (Windows) or utils/db_backup.sh (Linux)
  • Stop all Traverse components on source DGE and target DGE
  • Please make sure only the following components are running on the BVE: "Provisioning Database" and "BVE API"
  • Export device dependencies: (This entire step can be skipped if there are no device dependencies or you do not wish to retain device dependencies)

Note: device parameter can be a wildcard of the devicename (only '*' is supported) otherwise each device can be defined individually

From <TRAVERSE_HOME>, where --user is the department level user and --pass is the corresponding password and --device is the device name or a valid device name wildcard string:

 

(Windows)

Wildcard examples:

plugin\utils\exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "ABACABA*" >> c:\temp\list1.csv

plugin\utils\exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "CDCABA*" >> c:\temp\list1.csv

plugin\utils\exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "CA*" >> c:\temp\list1.csv

 

Individual device examples:

plugin\utils\exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "DEVICE1" >> c:\temp\list1.csv

plugin\utils\exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "DEVICE2" >> c:\temp\list1.csv

plugin\utils\exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "DEVICE3" >> c:\temp\list1.csv

 

(Linux)

Wildcard examples:

plugin/utils/exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "ABACABA*" >> /root/temp/list1.csv

plugin/utils/exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "CDCABA*" >> /root/temp/list1.csv

plugin/utils/exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "CA*" >> /root/temp/list1.csv

 

Individual device examples:

plugin/utils/exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "DEVICE1" >> /tmp/list1.csv

plugin/utils/exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "DEVICE2" >> /tmp/list1.csv

plugin/utils/exportAndDeleteDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --device "DEVICE3" >> /tmp/list1.csv

 

  • Move the devices from source DGE to target DGE

(Windows)

Wildcard examples:

apps\jre\bin\java -Xmx1024m -XX:-UseSplitVerifier -Dnetvigil.config="%CD%\etc\emerald.properties" -Dlog4j.configuration="file:///%CD%\etc\log4j.conf" -Djava.ext.dirs=webapp\WEB-INF\lib com.zyrion.traverse.utils.MoveDevices "%CD%\etc\emerald.xml" "OLDDGENAME" "NEWDGENAME" "ABACABA*"

apps\jre\bin\java -Xmx1024m -XX:-UseSplitVerifier -Dnetvigil.config="%CD%\etc\emerald.properties" -Dlog4j.configuration="file:///%CD%\etc\log4j.conf" -Djava.ext.dirs=webapp\WEB-INF\lib com.zyrion.traverse.utils.MoveDevices "%CD%\etc\emerald.xml" "OLDDGENAME" "NEWDGENAME" "CDCABA*"

apps\jre\bin\java -Xmx1024m -XX:-UseSplitVerifier -Dnetvigil.config="%CD%\etc\emerald.properties" -Dlog4j.configuration="file:///%CD%\etc\log4j.conf" -Djava.ext.dirs=webapp\WEB-INF\lib com.zyrion.traverse.utils.MoveDevices "%CD%\etc\emerald.xml" "OLDDGENAME" "NEWDGENAME" "CA*"

 

Individual device examples:

apps\jre\bin\java -Xmx1024m -XX:-UseSplitVerifier -Dnetvigil.config="%CD%\etc\emerald.properties" -Dlog4j.configuration="file:///%CD%\etc\log4j.conf" -Djava.ext.dirs=webapp\WEB-INF\lib com.zyrion.traverse.utils.MoveDevices "%CD%\etc\emerald.xml" "OLDDGENAME" "NEWDGENAME" "DEVICE1"

apps\jre\bin\java -Xmx1024m -XX:-UseSplitVerifier -Dnetvigil.config="%CD%\etc\emerald.properties" -Dlog4j.configuration="file:///%CD%\etc\log4j.conf" -Djava.ext.dirs=webapp\WEB-INF\lib com.zyrion.traverse.utils.MoveDevices "%CD%\etc\emerald.xml" "OLDDGENAME" "NEWDGENAME" "DEVICE2"

apps\jre\bin\java -Xmx1024m -XX:-UseSplitVerifier -Dnetvigil.config="%CD%\etc\emerald.properties" -Dlog4j.configuration="file:///%CD%\etc\log4j.conf" -Djava.ext.dirs=webapp\WEB-INF\lib com.zyrion.traverse.utils.MoveDevices "%CD%\etc\emerald.xml" "OLDDGENAME" "NEWDGENAME" "DEVICE3"

 

(Linux)

Wildcard examples:

database/schema/alter/moveDevices.sh 'OLDDGENAME' 'NEWDGENAME' 'ABACABA*' database/schema/alter/moveDevices.sh 'OLDDGENAME' 'NEWDGENAME' 'CDCABA*' database/schema/alter/moveDevices.sh 'OLDDGENAME' 'NEWDGENAME' 'CA*'

Individual device examples:

database/schema/alter/moveDevices.sh 'OLDDGENAME' 'NEWDGENAME' 'DEVICE1' database/schema/alter/moveDevices.sh 'OLDDGENAME' 'NEWDGENAME' 'DEVICE2' database/schema/alter/moveDevices.sh 'OLDDGENAME' 'NEWDGENAME' 'DEVICE3'

 

  • Import device dependencies: (This entire step can be skipped if there are no device dependencies or you do not wish to retain device dependencies)

From <TRAVERSE_HOME>, where --user is the department level user and --pass is the corresponding password and --file is the list of device dependencies generated in the step above:

 

(Windows)

plugin\utils\importAndCreateDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --file c:\temp\list1.csv

 

(Linux)

plugin/utils/importAndCreateDependency.pl --user DEPARTMENTLEVELUSER --pass PA$$W0RD --file /root/temp/list1.csv

 

  • Optimize db on old DGE and new DGE

(Windows)

utils\db_optimize.cmd

 

(Linux)

utils/db_optimize.sh

 

Once complete, start Traverse services. When the old DGE connects to the BVE, it will delete data for the devices that have been moved out of it from its database, and the new DGE will start to collect new data for those devices/tests that have been moved. During this cleanup phase you may see some extra disk I/O and writer queue backlog, but that should settle down after a while.

 

RELATED ARTICLES:

Migrating/Moving Devices From One DGE To Another

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.