Zephyr Windows to Linux Migration
Table of Contents
Zephyr Windows to Linux Migration:
Zephyr Windows to Linux Migration lets you migrate your data from a Windows environment to a Linux environment. This is a process that should be performed before upgrading to 6.3. After 6.2, a Windows backup file needs to be restored in Linux (a MySQL DB). Users need to connect to the itcc database and run the following SQL to rename the table.
rename table backupoldidvsnewid to backupOldIdVsNewId;
How to Restore a Windows Backup File to Linux
1. Take a backup from the Windows environment without any attachments
- You take the backup without attachments because the folders from a Windows backup file do not untar the correct directory structure within a Linux environment.
2. Create a tar.gz file of the attachments if need be or you can use 7-zip (tar then a gzip).
3. Install the same Zephyr version on your Linux environment.
4. Stop the Zephyr server.
5. Untar itcc.bak and the dversion.bak from the Windows backup.
tar -zxvf zephyrbackup_4.6_8405_2014-09-30_14130403.tar.gz
6. Convert the appropriate tables to the uppercase name where necessary. It can be downloaded directly into Linux using wget
wget http://www.yourzephyr.com/customers/linux/itcc.sh wget http://www.yourzephyr.com/customers/linux/dversion.sh
How to use the scripts
chmod +x itcc.sh chmod +x dversion.sh
./itcc.sh ./dversion.sh dversion.bak
7. Connect to MySQL.
drop database itcc; drop database dversion;
create database itcc; create database dversion;
mysql -uroot -proot itcc < itcc.bak mysql -uroot -proot dversion < dversion.bak
USE `itcc` ; UPDATE `preference_system` SET `value` = '${ZEPHYR_HOME}/backup_restore/bin/hotBackup.sh' WHERE `name` = 'backup.script.path';
localhost:/opt/zephyr/zephyrdata # tar -zxvf /home/admin/Documents/WindowsBackupToBeMigratedToLinux/attachment.tar.gz
To manually change the table names in MySQL directly after restoring itcc and dversion:
Use itcc;
RENAME TABLE qrtz_blob_triggers TO QRTZ_BLOB_TRIGGERS, qrtz_calendars TO QRTZ_CALENDARS, qrtz_cron_triggers TO QRTZ_CRON_TRIGGERS, qrtz_fired_triggers TO QRTZ_FIRED_TRIGGERS, qrtz_job_details TO QRTZ_JOB_DETAILS, qrtz_job_listeners TO QRTZ_JOB_LISTENERS, qrtz_locks TO QRTZ_LOCKS, qrtz_paused_trigger_grps TO QRTZ_PAUSED_TRIGGER_GRPS, qrtz_scheduler_state TO QRTZ_SCHEDULER_STATE, qrtz_simple_triggers TO QRTZ_SIMPLE_TRIGGERS, qrtz_triggers TO QRTZ_TRIGGERS, qrtz_trigger_listeners TO QRTZ_TRIGGER_LISTENERS;
Use dversion;
RENAME TABLE jackrabbit_thed_binval TO JACKRABBIT_THED_BINVAL, jackrabbit_thed_bundle TO JACKRABBIT_THED_BUNDLE, jackrabbit_thed_names TO JACKRABBIT_THED_NAMES, jackrabbit_thed_refs TO JACKRABBIT_THED_REFS, jackrabbit_version_binval TO JACKRABBIT_VERSION_BINVAL, jackrabbit_version_bundle TO JACKRABBIT_VERSION_BUNDLE, jackrabbit_version_names TO JACKRABBIT_VERSION_NAMES, jackrabbit_version_refs TO JACKRABBIT_VERSION_REFS;
How to Migrate a Windows Instance to Linux
1. Take a backup of the database (itcc and dversion).
mysqldump.exe –e –u[user name] -p[password] -h[host name] [database name] > C:\[filename].sql
2. Take a backup of the attachment folder. The attachment folder can be located from the following:
- '{Zephyr Dir}/zephyrdata'
3. Within Linux, create the database (itcc and dversion).
4. Restore the backup taken from Step 1 (both the itcc and dversion).
mysql –u[user name] -p[password] -h[host name] [database name] < C:\[filename].sql
5. Run the following query.
ALTER TABLE `qrtz_simprop_triggers` RENAME QRTZ_SIMPROP_TRIGGERS; ALTER TABLE `qrtz_simple_triggers` RENAME QRTZ_SIMPLE_TRIGGERS; ALTER TABLE `qrtz_scheduler_state` RENAME QRTZ_SCHEDULER_STATE; ALTER TABLE `qrtz_paused_trigger_grps` RENAME QRTZ_PAUSED_TRIGGER_GRPS; ALTER TABLE `qrtz_locks` RENAME QRTZ_LOCKS; ALTER TABLE `qrtz_job_history` RENAME QRTZ_JOB_HISTORY; ALTER TABLE `qrtz_job_details` RENAME QRTZ_JOB_DETAILS; ALTER TABLE `qrtz_fired_triggers` RENAME QRTZ_FIRED_TRIGGERS; ALTER TABLE `qrtz_cron_triggers` RENAME QRTZ_CRON_TRIGGERS; ALTER TABLE `qrtz_calendars` RENAME QRTZ_CALENDARS; ALTER TABLE `qrtz_blob_triggers` RENAME QRTZ_BLOB_TRIGGERS; ALTER TABLE `qrtz_triggers` RENAME QRTZ_TRIGGERS; // Run this Query If User is In 6.3 with the above Query ALTER TABLE `backupoldidvsnewid` RENAME backupOldIdVsNewId ;
6. Afterwards, install the Zephyr Standalone instance by passing the following parameter:
zephyr_xxx_xx.sh -VzSkipStartupData=true
7. Once the installation is complete, restore the backup of the zephyrdata taken in Step 2.
Additional Questions:
For any questions, please contact Zephyr Support.
- Web: https://support.getzephyr.com
- Phone: +1-510-400-8656
Starting Release 8.2, Zephyr Enterprise documentation is moving from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise Documentation page. https://support.smartbear.com/zephyr-enterprise/docs/en/welcome-to-zephyr-enterprise.html