Skip to main content

Move the installation

The server's installation and sonatype-work directories are portable and may be copied to the new location. Use the following process to move the server to a new location.

A unique identifier was generated for the instance when the server was created. We do not recommend using this instance copy as a deployment strategy for horizontal scalability.

  • Know the location of your license - the license details are encrypted within the local Java configuration. You will likely need to reinstall the license at the new location.

  • The external database requires a low-latency network connection or the server's performance will severely degrade

  • Ensure that the server meets the system requirements - this includes the Java version

  • Preserve operating system file permissions - use the same system account to run the new instance

  • Check the config.yml file for the locations of the sonatype-work directory and log files

  • The installation and sonatype-work directories should be copied when the server is not running. When using the internal database, copying the data files while the server is running may leave them in an inconsistent state that is difficult to recover.

Once the installation and sonatype-work directories have been moved to the new location; start the server and follow the prompts to upload the license file.

Move with rsync

Most of the server files are not continuously accessed while the server is running. A backup tool may reduce downtime by performing an initial copy while the service is still available for use. Later, a second pass is made to copy the difference once the server has been shut down. The second run to include any changes will take much less time, limiting the overall downtime to your end users.

Using rsync, the following command can be used.

rsync -avP <source> <dest>

Once this completes, shut down the server, and run the rsync copy with:

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.