- KB#: KKB000073
How to backup and restore a Kaseya server, and operate a "standby" server.
The data required to recover a Kaseya server in the event of failure is: -
- backup of SQL database
- selected directories from the Kaseya installation directory on the server (see details below)
A) Backup up the database & particular Kaseya front-end installation files
To ensure the Kaseya database is being backed up, go to System tab > Configure page within the VSA and look at the "database backup / maintenance" cycle. We recommend this is set every 1 day out of business hours. The "Backup folder on KServer" field specifies where the backup file will be saved on your Kserver. If your database is on a seperate computer from Kaseya, this path will be on the database server. For each backup that runs, a file called ksubscribers_db_yyyymmddhhmm.BAK will be created where yyyymmddhhmm is the time/date of the backup.
***The backup file should be regularly copied to another computer or removable media, or backed up using BUDR or 3rd party backup software***
*Specifc BUDR Note: Do not attempt to backup the KServer using BUDR while the KServer is running, even if VSS is enabled. Doing so can cause problems when the VSA attempts to write information about the backup to a database that is being backed up. KServer data is backed up automatically each time a database maintenance cycle is run. Database maintenance cycle frequency is set using the Run database backup / maintenance every <N> Days @ <Time> option in System > Server Management > Configure. You can use Schedule Folders to backup the folder containing the Kaseya database backup files.
You should not attempt to stop the SQL services or Kaseya Server services while running any BUDR backup of your Kaseya server, as Kaseya requires write access to the SQL database in order to update the backup results.
For maximum flexibility and resiliency, Kaseya recommends that you configure a Folder Backup in BUDR, manually copy/backup, or use another backup solution to back up the following folders on your Kaseya server in addition to any other backups that you run on the server:
*Note: Change 'C:\Kaseya' above as appropriate if you did not install the KServer to this default install directory.
If using BUDR folder backups for the above folders, confirm that the Schedule Folders schedule does not coincide with the Kaseya database backup configured on the System tab > Server Management > Configure page, and that the folder you have configured as the Backup folder on KServer is included in folders in the Folder Backup.
To restore your VSA to a new Kaseya server:
1) Install Kaseya on your new server ON A DIFFERENT PORT (e.g. 5722) (this will stop the agents from checking into your new server until you have imported the DB)
2) Go to System > Configure and click Get Latest Hotfixes
3) Allow about 10 minutes for the hotfixes to download then click Reapply Schema
4) Copy the data saved from your old server to your new server.
- Copy back the UserProfiles and ManagedFiles directories saved from the original installation. Note that the ManagedFilesVSAHiddenFiles directory created during the reinstallation will not be overwritten.
- Copy back the WebPages\themes\banner\images\new, WebPages\themes\compact\images\new, and WebPages\themes\default\images\new directories saved from the original installation to restore any customized icon images.
- If you have one copy back your customised header to the WebPages\Access folder
5) Log in to your new VSA server as a master administrator.
6) Select the System tab.
7) Click on the Configure function.
8) Click the Restore button on the Configure page.
9) Select the SQL database backup by locating the backup file ksubscribers_db_yyyymmddhhmm.BAK. Click the Restore button to confirm the database restore operation. (note that if you have a seperate DB server the path will be to a location on the DB server not locally on the Kaseya server)
10) After the database restore completes, log back in to the Kaseya server using one of the administrator accounts from your old server.
11) Update with the original port number (5721 by default) on the System tab, Configure function, by editing the port number and clicking on the Change Port button. (This is to ensure that agents do not start checking into your new server before you have restored the DB, otherwise they will create new machine accounts with blank settings, giving you duplicate accounts for all your machines. This can also be acheived by only changing the IP address to one know by the agents after the restore, but changing the port is a useful safegaurd).
12) Configure the new server with the correct IP address for your agents to check into, or re-point your DNS records to the new server
C) Using as a "standby" server
Kaseya does not currently have any built-in failover capability. However we do recommend that to ensure fast recovery in the event of a server failure that you operate a standby server. The standby server can also be used for testing purposes.
To set up a standby server for the fastest possible recovery in the event of your production server failing: -
1) Install Kaseya on the standby server
2) Restore your data as per steps 1 to 10 of the Restore procedure above
3) Stop the Kaseya services and set them to Manual
4) Create a script or batch process to copy the database backup file and Kaseya installation directories specified above to the standby server. Schedule this for after the Kaseya DB backup / maintenance window.
5) On the production server, go to Agent tab > Check-in Control and change Secondary Kserver for all agents to the IP address or DNS name of the standby server
Then if your production server fails, switch to the standby server using these steps: -
1) Start Kaseya services on standby server
2) Log in to VSA and execute steps 2 and 3 of the Restore procedure above
3) Execute step 9 of the Restore procedure above (we recommend you test this on a regular basis to make sure you are getting good backups and the standby server is operational).
4) after restoring the DB, go to Agent tab > Check-in Control and change Primary Kserver for all agents to the IP address or DNS name of the standby server
5) Execute steps 11 and 12 of the Restore procedure to allow the agents to start checking in
- Additional Information
Please note - your license agreement prohibits use of the same license code on 2 servers concurrently. If for any reason you wish to operate 2 Kaseya servers at the same time (e.g. for testing an upgrade), please contact your account manager.
- Applies To
Kaseya Server (all versions)