How to Migrate Variations to a New Machine
This page explains how to migrate Variations server to a new machine.
If you have any questions about or problems with the migration process, please email the Variations support list, email@example.com, or if necessary contact Chris Colvard directly (812-856-0026, firstname.lastname@example.org).
Important things to note about this migration:
- This migration documentation assumes Variations 6.0 or higher.
- This migration assumes that the hostnames and IPs used by the Variations server are the same used by the new machine.
- Backup the system according to your institution's practices before attempting the migration.
As dmlserv, from /home/dmlserv, do the following:
- Create archive of the Variations filesystem:
tar cvzf variations-backup.tar.gz log/ Variations-6*/
- Create archive of the Variations content:
tar cvzf content-backup.tar.gz content/
- MySQL Databases
mysqldump --create-options -r dmllib-dump.sql --databases <LIBRARY_NAME>_DMLLIB
mysqldump --create-options -r metadata-dump.sql --databases <LIBRARY_NAME>_METADATA
If you have Variations-Web installed, then do the following as the tomcat user:
- Create archive of Variations-Web:
tar cvzf variations-web-backup.tar.gz conf/variations* logs/variations* webapps/variations*.war
Moving to New Machine
First, setup the new machine based on instructions
Then do the following as dmlserv except where noted:
- Copy files from old system to /home/dmlserv
- Unzip backup tar:
tar xvzf variations-backup.tar.gz
- Unzip content tar:
tar xvzf content-backup.tar.gz
- Load databases (as root):
mysql < /home/dmlserv/variations-dump.sql
mysql < /home/dmlserv/dmllib-dump.sql
- Create a user account dmlserv and grant permissions to dmlserv (as root):
grant all on library_name_DMLLIB.* to 'dmlserv'@'localhost';
grant all on library_name_METADATA.* to 'dmlserv'@'localhost';
- Set the password for dmlserv to correspond to the value used in any configuration files:
set password for 'dmlserv'@'localhost' = password('your-password');
Create a file in the dmlserv home directory named .my.cnf that contains the following:
The password for the MySQL user dmlserv
- Set permissions on the file to make sure that no one else can read the file:
chmod 600 /home/dmlserv/.my.cnf
- Change directories to the latest Variations installation:
- Start Variations:
- Check that everything is running:
bin/checkVariations.sh. You should see output listing EXAMPLE under Databases currently running
Make sure to merge any added entries to your crontab before replacing it.
Prepare the system using these instructions.
Next do the following as the tomcat user:
- Copy Variations-Web archive from old system to /usr/local/tomcat
- Extract the contents:
tar xvzf variations-web-backup.tar.gz
Restart tomcat and check to see that the webapps are running properly: