Ask the Community
Groups
Backing up and restoring Kaseya server / operating a standby server - Connect IT Community | Kaseya
<main> <article class="userContent"> <div> <h3 data-id="question"><strong>QUESTION</strong></h3> <p>How to backup and restore a Kaseya server, and operate a "standby" server.</p> <p> </p> </div> <div> <h3 data-id="answer"><strong>ANSWER</strong></h3> <p>The data required to recover a Kaseya server in the event of failure is: -<br>- backup of SQL database<br>- selected directories from the Kaseya installation directory on the server (see details below)<br><br><em><strong>A) Backup up the database & particular Kaseya front-end installation files</strong><br></em><br>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 separate computer from Kaseya, this path will be on the <em>database server</em>. For each backup that runs, a file called <strong>ksubscribers_db_yyyymmddhhmm.BAK</strong> will be created where <em>yyyymmddhhmm</em> is the time/date of the backup.<br><br><strong>***The backup file should be regularly copied to another computer or removable media, or backed up using BUDR or 3rd party backup software***<br></strong><br><strong><em>*Specific BUDR Note:</em></strong> 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.<br><br><strong>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.</strong></p> <p>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:</p> <p>C:\Kaseya\UserProfiles<br>C:\Kaseya\WebPages\ManagedFiles<br>C:\Kaseya\WebPages\banner\default\images\new<br>C:\Kaseya\WebPages\compact\default\images\new<br>C:\Kaseya\WebPages\themes\default\images\new<br>C:\Kaseya\WebPages\Access</p> <p> </p> <p>*Note: Change 'C:\Kaseya' above as appropriate if you did not install the KServer to this default install directory.</p> <p> </p> <p>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.<br><br><strong><em><img class="emoji" src="https://kaseya.vanillacommunities.com/resources/emoji/sunglasses.png" title="B)" alt="B)" height="20" loading="lazy"></img> Restore<br></em></strong><br>To restore your VSA to a new Kaseya server:</p> <p>1) Install Kaseya on your new server <strong>ON A DIFFERENT PORT (e.g. 5722)</strong> (this will stop the agents from checking into your new server until you have imported the DB)<br>2) Go to System > Configure and click <strong>Get Latest Hotfixes</strong><br>3) Allow about 10 minutes for the hotfixes to download then click <strong>Reapply Schema</strong><br>4) Copy the data saved from your old server to your new server.</p> <ul><li>Copy back the <strong>UserProfiles</strong> and <strong>ManagedFiles</strong> directories saved from the original installation. Note that the <em>ManagedFilesVSAHiddenFiles</em> directory created during the reinstallation will not be overwritten.</li> <li>Copy back the <strong>WebPages\themes\banner\images\new</strong>, <strong>WebPages\themes\compact\images\new</strong>, and <strong>WebPages\themes\default\images\new</strong> directories saved from the original installation to restore any customized icon images.</li> <li>If you have one copy back your customised header to the <strong>WebPages\Access</strong> folder</li> </ul><p>5) Log in to your new VSA server as a master administrator. <br>6) Select the <strong>System</strong> tab. <br>7) Click on the <strong>Configure</strong> function. <br>8) Click the <strong>Restore</strong> button on the <em>Configure</em> page. <br>9) Select the SQL database backup by locating the backup file <strong>ksubscribers_db_yyyymmddhhmm.BAK</strong>. Click the <strong>Restore</strong> 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) <br>10) After the database restore completes, log back in to the Kaseya server using one of the administrator accounts from your old server. <br>11) Update with the original port number (5721 by default) on the <strong>System</strong> tab, <strong>Configure</strong> function, by editing the port number and clicking on the <strong>Change Port</strong> 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).<br>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<br><br><strong><em>C) Using as a "standby" server</em><br><br></strong>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.<br><br>To set up a standby server for the fastest possible recovery in the event of your production server failing: -<br><br>1) Install Kaseya on the standby server<br>2) Restore your data as per steps 1 to 10 of the Restore procedure above<br>3) Stop the Kaseya services and set them to Manual<br>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.<br>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<br><br>Then if your production server fails, switch to the standby server using these steps: -<br><br>1) Start Kaseya services on standby server<br>2) Log in to VSA and execute steps 2 and 3 of the Restore procedure above<br>3) Execute step 9 of the Restore procedure above <em>(we recommend you test this on a regular basis to make sure you are getting good backups and the standby server is operational).</em><br>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<br>5) Execute steps 11 and 12 of the Restore procedure to allow the agents to start checking in</p> </div> <h3 data-id="n-a"> </h3> <h3 data-id="additional-information"><strong>Additional Information</strong></h3> <div> <p><em>Please note - your license agreement prohibits the 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.</em></p> </div> <h3 data-id="applies-to"><strong>Applies To</strong></h3> <p> Kaseya Server (all versions)</p> </article> </main>