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, variations-discuss@lists.sourceforge.net, or if necessary contact Chris Colvard directly (812-856-0026, cjcolvar@indiana.edu).
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.
Migration Preparation
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
- Run
mysqldump --create-options -r dmllib-dump.sql --databases <LIBRARY_NAME>_DMLLIB
- Run
mysqldump --create-options -r metadata-dump.sql --databases <LIBRARY_NAME>_METADATA
- Run
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):
mysql
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:
[client] password="mysql-dmlserv-password"
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:
cd Variations-6.2/
- Start Variations:
bin/startVariations.sh
- Check that everything is running:
bin/checkVariations.sh
. You should see output listing EXAMPLE under Databases currently running Install crontab:
crontab bin/crontab
Make sure to merge any added entries to your crontab before replacing it.
Migrating Variations-Web
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:
bin/shutdown.sh bin/startup.sh