Occasionally there is a need to copy or move data from one VisibleThread VM to another, for example when setting up a test server with a replica of your production database or migrating your VisibleThread data to a new environment.
The basic steps involved to migrate your data are as follows:
- Export your data from the source VM
- Copy the exported file to the destination VM
- Import the data from the export file on the destination VM
Note: This process will migrate all users, licenses and data
Export data from source VM
Backup the application data on your old vm by running the following commands on the server (old vm):
cd /home/visiblethread/VisibleThreadTools
./vt-backup.sh
or for Red Hat:
cd /opt/visiblethread/VisibleThreadTools
./vt-backup.sh
This will create a backup file in the /home/visiblethread/VisibleThreadTools/vtbackups folder
Copy export data file to destination VM
Using ftp or some other means copy the export file created above to your new VM. For details on how to connect to your VM using ftp see here: https://visiblethread.zendesk.com/hc/en-us/articles/214225546-Accessing-the-VisibleThread-Virtual-Appliance-using-Secure-FTP
Import data on the destination VM
Open an ssh session on the destination vm and import the data (exported above) by typing the following commands:
cd /home/visiblethread/VisibleThreadTools
./vt-restore.sh -f vtbackup/<backup-file>
or for Red Hat:
cd /opt/visiblethread/VisibleThreadTools
./vt-restore.sh -f vtbackup/<backup-file>
where "<backup-file>" is the name of the export file created in step 1.
Copy over any custom certificates to the destination VM
Our software comes with self-signed certificates, but if you've followed our guide on installing SSL certificates you will need to copy those certificates over to the new server and update your Apache configuration file.
On Ubuntu servers, the certificate files and Apache config are stored in:
Certs: /home/visiblethread/VisibleThreadTools/cert/
Apache: /etc/apache2/sites-enabled/000-default.conf
On Red Hat servers, the certificate files and Apache config are stored in:
Certs: /opt/visiblethread/VisibleThreadTools/cert/
Apache: /etc/httpd/conf.d/visiblethread.conf
Once the certificates are copied to the new server, reference them in the Apache configuration file, then restart the services.
Apache file lines:
# Ubuntu
SSLCertificateFile /home/visiblethread/cert/myserver.com.crt SSLCertificateKeyFile /home/visiblethread/cert/myserver.com.key
# If a chain/intermediate key is needed add the following below SSLCertificateKeyFile:
SSLCertificateChainFile /home/visiblethread/cert/myserverchain.com.crt
# On RedHat Deployment
SSLCertificateFile /opt/visiblethread/cert/myserver.com.crt
SSLCertificateKeyFile /opt/visiblethread/cert/myserver.com.key
# If a chain/intermediate key is needed add the following below SSLCertificateKeyFile:
SSLCertificateChainFile /opt/visiblethread/cert/myserverchain.com.crt
Restart services on Ubuntu:
sudo service supervisor restart
Restart services on Red Hat
sudo systemctl restart visiblethread-docs
Verify the VisibleThread application is working correctly
Once the restore process is complete ask a user to log in to the VisibleThread application on the new VM. Verify the data is as expected.