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):
# Ubuntu
cd /home/visiblethread/VisibleThreadTools
./vt-backup.sh
# Red Hat
cd /opt/visiblethread/VisibleThreadTools
./vt-backup.sh
This will create a backup file in the /home/visiblethread/VisibleThreadTools/vtbackups folder
# Windows
cd C:\Program Files\visiblethread\vtdocs\VisibleThreadTools
vt-backup.bat
This will create a backup file in the C:\Program Files\VisibleThread\vtdocs\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:
# Ubuntu
cd /home/visiblethread/VisibleThreadTools
./vt-restore.sh vtbackup/<backup-file>
# Red Hat
cd /opt/visiblethread/VisibleThreadTools
./vt-restore.sh vtbackup/<backup-file>
# Windows
cd C:\Program Files\visiblethread\vtdocs\VisibleThreadTools
vt-restore.bat 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
On Windows, the certificate files and Apache config are stored in:
Certs: C:\Program Files\VisibleThread\vtdocs\cert
Apache: C:\Program Files\VisibleThread\vtdocs\Apache24\conf\visibledthread.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
# Red Hat
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
# Windows
SSLCertificateFile "C:\Program Files\VisibleThread\vtdocs\cert\yourcert.cert"
SSLCertificateKeyFile "C:\Program Files\VisibleThread\vtdocs\cert\vyourkeycert.cert"
# If a chain/intermediate key is needed add the following below SSLCertificateKeyFile:
SSLCertificateChainFile "C:\Program Files\VisibleThread\vtdocs\cert\yourchaincert.cert"
Restart services on Ubuntu:
sudo service apache2 restart
Restart services on Red Hat
sudo systemctl restart httpd
Restart services on Windows
Search for Services, In the services panel look for vt-docs-apache. Right click and restart
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.