Backup and Restore
Be aware some file locations may have been overridden from their default locations via configuration. Refer to your configuration for the correct locations. If utilizing an external database, refer to the Postgres instructions for your specific database version in use instead of following the database backup instructions.
Data Overview
To perform a complete backup, all types of data used by VADAAR Server need to be backed up. VADAAR Server stores and uses three different types of data:
Type | Description |
---|---|
Configuration | This is the settings.json file. Configuration may additionally be specified as environment variables and command-line arguments. Please refer to OS documentation for backup of those aspects of configuration, or you can migrate those configuration options to the settings.json file. |
Storage Disks | These locations store media such as recorded video files. The locations on disk, or network attached storage, are specified by the configuration. |
Database | This is responsible for storing all other data. Some examples include: recording metadata, users, streams, connected resources and application state. The location on disk is specified by the configuration. |
Database Backup
To perform a database backup:
Navigate to Settings > Database.
Click the Backup button, this downloads a backup file.
Stop the VADAAR Server service.
Backup the following file locations:
Settings.json
By default, you will find your settings.json file in the following location:
- Windows
- Linux
C:\ProgramData\VADAAR-Server\settings.json
/usr/share/vadaar-server/settings.json
Storage Disks
By default, if you have set up a Storage Location using VADAAR Server's Default Storage Disk you will find the corresponding data stored in the following location for backup:
- Windows
- Linux
C:\ProgramData\VADAAR-Server\Storage
/home/vadaar/.vadaar-server/storage
For other Storage Disk locations consult your settings.json file and backup the necessary paths as specified in your settings under the
StorageDisks
configuration section.
Database Restore
VADAAR needs to be relicensed after a restore. If using the same license, this involves contacting ImmersaView Support (support@immersaview.com
) to reissue the license so the instance can be activated using the same license.
To restore a database from a backup:
- Restore your backup files from the Backup Process to their corresponding locations.
- Start the VADAAR Server Service
- Navigate to Settings > Database
- Click the Restore button and upload the file downloaded from the Backup Process.
- Restart VADAAR Server.
- Activate VADAAR (see Licensing for steps).
Result: VADAAR is ready to use.
Database Backup and Restore via the command-line interface (CLI)
If utilizing an external database, refer to the Postgres instructions for your specific database version instead.
VADAAR Server can be set to start in a special mode that performs a database backup or restore then immediately exits. A command-line argument is temporarily specified to run VADAAR Server in this mode. Once the backup or restore operation has completed, remove the command-line argument.
These options can be used in tandem with the Web UI. For example, you can perform a backup from the Web UI and then restore using the CLI.
Stop the VADAAR Server service before running the following commands.
- Windows
- Linux
VADAAR Server runs as a Windows Service under the SYSTEM user. PsExec from Microsoft's Sysinternals is required to run the backup and restore operations.
Backup
The following command saves a backup to VADAAR Server's configuration directory.
psexec.exe -i -s "C:\Program Files\VADAAR Server\VadaarServer.exe" --DatabaseBackup="C:\ProgramData\VADAAR-Server\vadaar-db-backup.bak"
Restore
The following command restores from a backup file located in VADAAR Server's configuration directory.
psexec.exe -i -s "C:\Program Files\VADAAR Server\VadaarServer.exe" --DatabaseRestore="C:\ProgramData\VADAAR-Server\vadaar-db-backup.bak"
Backup
The following commands create the backup file in a common temporary location, then copies the backup file to the current user's home directory.
sudo -u vadaar bash -c 'cd ~/vadaar-server; ./VadaarServer --DatabaseBackup=/tmp/vadaar-db-backup.bak'
cp /tmp/vadaar-db-backup.bak ~
Restore
The following commands copy the backup file into a common temporary location, then restores the database using that file.
cp vadaar-db-backup.bak /tmp
sudo -u vadaar bash -c 'cd ~/vadaar-server; ./VadaarServer --DatabaseRestore=/tmp/vadaar-db-backup.bak'
Start the VADAAR Server service after completing a backup or restore.