Migrating to a new server
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
Page under construction.
Note: If you migrate from a multi-db (Agency) setup, you have to migrate all databases.
To migrate your UXWizz dashboard to a new server, you have to:
Before migrating the database, it's a good idea to first remove all unnecessary data (e.g. old recordings, heatmaps, etc.) in order to reduce the database size as much as possible.
UXWizz provides a script to back up the current database. Simply run this in your UXWizz folder:
sh /server/cron/ust_backup_dh.sh
We will use scp
over ssh
to copy the file directly to the new server. (you can also manually copy this file)
Skip if the new server uses password auth. This key is only used for the scp authentication.
On the original server, generate a new SSH key:
ssh-keygen -t rsa -b 4096
# View and CTRL+C copy the key
cat ~/.ssh/id_rsa.pub
On the new server, add the previously generated public key:
# Open the authorized keys file
nano ~/.ssh/authorized_keys
# Add a new line with the previous contents from id_rsa.pub
ssh-rsa AAAA_EXISTING_KEYS...
ssh-rsa AAAA_THE_NEW_KEY...
Finally, start copying the backup file (replace the filename and the IP to the new server IP)
scp your_backup.sql.gz [email protected]:/tmp/ust.sql.gz
On the new server, unzip the backup, create a new database (preferably with the same name as the old one) and import the sql file:
gunzip ust.sql.gz
mysql -u root -p -e "CREATE DATABASE new_database_name; USE new_database_name; SET autocommit=0 ; source ust.sql ; COMMIT;"
You might also have to create the same users as before. On the original server, you can see existing MySQL users and their permissions:
apt-get install percona-toolkit
pt-show-grants -u YOUR_MYSQL_USER -p YOUR_MYSQL_PASSWORD --database YOUR_UXWIZZ_DB
You can copy those grant commands and run them on the new MySQL instance to create the users and give grant privileges.
Assuming your installation folder is /var/www/html:
cd /var/www/
scp -r html [email protected]:/var/www/
Note: If you had cron jobs enabled, you should also copy the contents of crontab -e
Go to your domain name's DNS configuration and update the IP to point to the new server.
For any other server configuration (HTTPS certificate, MySQL optimized configuration) check out the UXWizz new server installation guide.