If you have recently upgraded your CDRouter system hardware to a new NTA1000 platform, this article will help you transfer all existing configuration data and test results to the new system.
The cdrouter-clone utility available with the NTA1000 can make an exact copy of your old system’s CDRouter database, so there is no need to import or manually copy anything, and you can resume testing right where you left off.
The CDRouter database and all test data, including config files, packages, devices, and test results are stored in a central location on the system.
In CDRouter 10.0
and all current versions, this data is stored in the
directory. Prior to CDRouter 10.0, all of CDRouter’s data was stored
/usr/buddyweb directory of the system. When CDRouter
is upgraded from an older version to 10.0 or higher, these two
directories are automatically linked together so that
/usr/cdrouter-data both point to the same location on disk.
When copying your CDRouter data to a new hardware platform, it can
be confusing to copy this data correctly and ensure the link between
/usr/cdrouter-data remains intact. This can lead
to errors and possible corruption of the CDRouter database.
The cdrouter-clone utility will automatically copy these data directories to your NTA1000 and ensure the link between them is preserved as well.
The cdrouter-clone utility is only available in CDRouter 10.5 and higher.
Any existing CDRouter data that is present on the new NTA1000 will be deleted once the cloning process starts. Please contact firstname.lastname@example.org if you have any concerns about preserving data that you may have created on the NTA1000 prior to running this procedure.
eth0management interface of both machines must be connected to the same network so that the NTA1000 can connect to the old CDRouter system via SSH.
You must have the IP address and
'root'password of the old CDRouter system. You will be prompted to enter this password at the start of the procedure.
Make sure there are no tests running on either system. The cdrouter-clone utility will automatically shut down CDRouter on both systems which will interrupt any tests that may currently be running.
Data in custom testpaths and any data outside of the
/usr/cdrouter-data/directory will not be copied by cdrouter-clone. You will need to manually copy this data to the NTA1000.
Data transfer steps
In CDRouter 10.5 and newer versions, The data transfer process is fully automated. Simply open a CLI terminal on the new NTA1000 and run the cdrouter- clone utility with the IP address of the old system that you want to clone.
The cdrouter-clone utility will SSH to the root account of the old system and transfer an exact copy of the CDRouter test data to the new NTA1000.
Log in to the
rootuser account of the NTA1000 and open a command terminal. Run the cdrouter-clone program at the command prompt with the IP address of the old CDRouter system that you want to copy data from (eg. “10.1.1.25”). The cdrouter-clone utility can be found in the
/usr/cdrouter/bin/directory on the NTA1000.
[root@nta1000 ~]# /usr/cdrouter/bin/cdrouter-clone 10.1.1.25
The cdrouter-clone utility will open an SSH connection to the old CDRouter system and prompt you for the
rootuser password on that system. You may also see a message containing the public key fingerprint of that system.
Enter ‘yes’ to confirm that you want to proceed with the SSH connection.
[root@nta1000 ~]# /usr/cdrouter/bin/cdrouter-clone 10.1.1.25 The authenticity of host '10.1.1.25:22 (10.1.1.25:22)' can't be established. ECDSA key fingerprint is d1:18:48:db:be:6b:0f:f3:1b:8d:21:61:df:7c:28:c0. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '10.1.1.25:22' (ECDSA) to the list of known hosts email@example.com's password:
After connecting and verifying the data on the remote system, cdrouter-clone will print a warning message that the local CDRouter data and results will be deleted, and ask you to confirm if you want to continue.
Enter ‘yes’ to confirm and proceed with the cloning process.
firstname.lastname@example.org's password: checking CDRouter systems, this may take a while on large systems... done. WARNING: * This program will erase the local CDRouter data directory of this system and replace it with the data from 10.1.1.25 * All data that is currently in /usr/cdrouter-data will be PERMANENTLY DELETED. THIS ACTION CANNOT BE UNDONE AND MUST NOT BE INTERRUPTED ONCE STARTED. Are you sure you want to do this (yes/no)? yes
The cdrouter-clone utility will shutdown CDRouter on both systems if necessary, and then proceed to copy all of the data from the old system to your NTA1000.
Do not to restart CDRouter or reboot your systems while the data transfer is in progress.
Are you sure you want to do this (yes/no)? yes stopping CDRouter systems... done. copying CDRouter data from 10.1.1.25... 2.94 GiB / 4.06 GiB [==========>-----] 72.56% 23.12 MiB/s 48s
When the data transfer is finished, cdrouter-clone will automatically restart CDRouter and run the cdrouter-migrate utility to ensure that any configs or test packages created in older versions of CDRouter will be available on the NTA1000.
If you run cdrouter-clone with the
-migrate-resultsoption, the cdrouter-migrate utility will also migrate test results that were created in older versions of CDRouter. Note that migrating test results may take a long time depending on the number of results contained in the database.
copying CDRouter data from 10.1.1.25... done. restarting CDRouter systems... done. Trying to migrate testpaths, configs, packages, results Migrating custom testpaths... done. Migrating configs... done. Migrating packages... done. Migrating results... done. 0 of 0 custom testpaths were migrated successfully 54 of 54 configs were migrated successfully 25 of 25 packages were migrated successfully 2694 of 2694 results were migrated successfully Total time 2s Migration of testpaths, configs, packages, results marked as completed in /usr/cdrouter-data/etc/config.yml /usr/cdrouter/bin/cdrouter-clone has finished cloning. [root@nta1000 ~]#
After the cloning has completed, the CDRouter web interface on the NTA1000 should appear identical to the one that was running on your old system. You may now connect your CPE devices and resume your testing.
Note that you may need to update some of your config files if the network
interface names (ie.
'wlan0', etc.) are different
on the NTA1000 than they were on your old system.
Also note that any custom testpaths configured in the CDRouter database will produce warnings until you have manually copied the custom test modules from the old system to the NTA1000. Go to the Preferences page in the CDRouter web interface if you need to update or delete any custom testpaths
If you encounter any problems while using the cdrouter-clone utility, please contact email@example.com for assistance.