To move a Sonatype IQ Server instance to a new location you will need the following:
- The installation directory (e.g. nexus-iq-server-1.182.0-01).
- The sonatypeWork directory (e.g. sonatype-work/clm-server).
- Correct system requirements in place on the new location/server as documented in: https://help.sonatype.com/en/system-requirements.html
- If also re-locating the external database, then a copy of the original external database should be moved into a new server, and the moved instance configured to point at that new server
The Installation Directory
The installation directory of a Sonatype IQ Server installation is portable* and can be copied to the new location. Be sure to preserve operating system file permissions when doing this.
Note: The config.yml file, located under the installation directory, is the main configuration file for the IQ Server install. If you have made any customizations to this file e.g. baseUrl, pathnames, external database configuration etc, be sure to check them as they may need to be adjusted in the new installation.
Please consider the following documentation when checking the config.yml for any potential adjustments: https://help.sonatype.com/en/config-yaml.html
The sonatypeWork Directory
The sonatypeWork directory of a Sonatype IQ Server installation is portable and can be copied to the location. If you're not sure where the sonatypeWork directory of your installation is located, check the value of the sonatypeWork property within the config.yml file.
General Advice
Note that the directories must be copied when the IQ Server is not running but to minimize downtime, consider using a backup tool that can perform incremental file system backups. One commonly used tool that can do this is the "rsync" program that can be found in Linux distributions.
When using a backup tool that can perform incremental backups, an initial copy of the directories can be done while the original IQ Server instance is still running. If you're using rsync, this can be done with "rsync -avP <source> <dest>".
Once this completes, shut down IQ Server, and run a rsync copy using "rsync -avP --del <source> <dest>". This second copy should run quite quickly, since rsync will only be handling the delta of files between the first and second copy.
If your original system has a slow disk consider running the first rsync with "ionice -c3 rsync". This will prevent rsync from consuming all disk bandwidth.