-
Notifications
You must be signed in to change notification settings - Fork 53
Cypress 3 Migration Instructions
These instructions are for Cypress v3 which is not the latest version of Cypress, and will not work correctly with Cypress v4.
This guide will cover everything required to migrate your Cypress v3 install to a new Cypress v3 instance. This guide will cover the steps required assuming you have SSH access to the 2 machines. For the rest of this guide we will assume the name of the old host is cypress-old
and the name of the new host is cypress-new
.
As always, make sure to take a backup of your old Cypress instance in case something goes wrong during the transfer.
SSH into cypress-old
and run the following commands:
sudo su cypress
cd
mkdir -p cypress-backup
mongodump --out cypress-backup/mongo-backup
cp /opt/cypress/config/secrets.yml cypress-backup/
cp -r /opt/cypress/public/{data,uploads} cypress-backup/
tar -zcvf cypress-backup.tgz cypress-backup
sudo cp cypress-backup.tgz /home/ubuntu
Copy this backup directory from your old host to your new host
scp ubuntu@cypress-old:cypress-backup.tgz cypress-backup.tgz
scp cypress-backup.tgz ubuntu@cypress-new:cypress-backup.tgz
SSH into cypress-new
and run the following commands:
sudo cp cypress-backup.tgz /home/cypress
sudo su cypress
cd
tar -zxvf cypress-backup.tgz
mv -f cypress-backup/secrets.yml /opt/cypress/config/secrets.yml
rm -rf /opt/cypress/public/{data,uploads}
mv cypress-backup/{data,uploads} /opt/cypress/public/
mongorestore --drop cypress-backup/mongo-backup
If the version of Cypress that you have migrated to is newer then run the following additional commands as the cypress user:
cd /opt/cypress
RAILS_ENV=production /opt/ruby_build/builds/opt/cypress/bin/bundle exec rake db:migrate
Also, make sure that all of the settings in the Admin > Application Settings are all still correct.
Reboot the machine in order to verify all services are restarted and using the correct data. You should now have a fully copy of your Cypress instance running on a new machine.