Backing up and restoring VisibleThread data

Backing up VisibleThread data


It is recommended that you back up the VisibleThread server regularly so that in the unlikely event of a system failure, or outage, the system can be restored to a stable state with minimal loss.


The VisibleThread Server contains a backup script that will backup all VisibleThread user accounts and user data. This script is useful as it takes a relatively short amount of time to run. The application does not have to be brought down to run this backup.

To run this script log on to the VisibleThread Virtual Server console and execute the following commands:

 cd VisibleThreadTools

Note You may be prompted for the “visiblethread” user password when running this command.

This will create a backup tar.gz file in the /home/visiblethread/VisibleThreadTools/<vtbackups> folder.


Creating a scheduled backup of VisibleThread data

To automate the backup execute the following commands on the VM console:

  1. Open the crontab editor sudo crontab -e
  2. If prompted to choose an editor enter '2' for 'nano'
  3. The editor should load. using the cursor keys, move to the last line in the editor and enter the following: 0 0 * * 0 /home/visiblethread/VisibleThreadTools/ >> /tmp/visiblethread-cron.log 2>&1
  4. Now type CTRL-O, hit return and then CTRL-X to exit the editor.
  5. This has now setup a scheduled task to run at midnight each Sunday morning to run the backup.

You can change the entry above to choose whatever time interval you like for the job.

Note: This creates a log file in '/tmp/visiblethread-cron.log ' you should check this file on a regular basis to ensure there are no errors with the backup.

For more information on the format of the cron entry see this article:


Note both of these simply archive the user data and place it in the /home/visiblethread/VisibleThreadTools/vtbackups directory. The ensure resiliency against VM failure, they should be regularly ftp'd or synched off the VM to another location.


Setting up a scheduled task to retrieve backup files from the VisibleThread VM


One approach to automate the retrieval of the files created by the CRON backup (see above) is to create a scheduled task on a windows server somewhere in your network to FTP the latest cron backup from the VisbileThread server and copy it to a location on your network. You can do this using WinScp by following these steps.


  1. First identify the machine you wish to use to run the scheduled ftp pull request. This must be able to ping the VisbileThread server, and should be running and OS that contains the Windows Task Scheduler (e.g. Windows server)
  2. Install WinScp on this machine (see
  3. Now startup WinScp and create a secure ftp connection for your VisibleThread server. Make sure you save the username and password for the VisibleThread server in the connection, and give the connection the name 'VisibleThreadServer'sftp.png
  4. Test the connection by clicking 'Login'
  5. Once you have the FTP connection correctly defined take the attached file "vt-backup.txt" and save it on the Windows Server as "C:\VTBackups\vt-backup.js"
  6. Now open Windows Task Scheduler and create a new Scheduled Task Called 'VisibleThread Backup Synch'
  7. Under the 'Trigger' tab create a new trigger to define a schedule for this task. Give the task a schedule that corresponds with how often the CRON backup on the VisibleThreadServer will run. For example if the VisibleThreadServer backup runs at 1am every night, the windows task should run at 2am every night (to give the VisbileThread backup enough time to complete).
  8. Under the 'Actions' tab, create a new action and fill in the values from the screenshot below:backupaction.png
  9. Save your changes

You now have created a scheduled task that runs on your Windows server that using Secure FTP to pull down the backup file created by the CRON job on the VisibleThread server. The backup file will be placed in the c:\VTBackups folder on your Windows Server


Restoring from a backup file


To restore the VisibleThread data log on to the VisibleThread Virtual Appliance console and execute the following commands:

cd VisibleThreadTools
./ vtbackups/<backupfile>

Note You may be prompted for the “visiblethread” user password when running this command.

The <backupfile> parameter is the name of a backup file created using the ‘vt-backup’ command.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Article is closed for comments.