Home » Database backup and restore
 

Data Back Up and Restore

Endpoint Central stores information like configuration details, status of deployed configurations, and details about reports, like User Logon reports and Active Directory reports, in a database. Creating a backup of this database and certain important files like configuration files is necessary to prevent loss of data.

You can back up data automatically, by scheduling a back up to happen at a specified time or by taking a back up manually. You can also restore this data when required. For example, assume that your hard disk crashes and you have to re-install Endpoint Central. You can use the last back up you took to restore all the required information. Note that this is possible only if the backup file is stored in a computer other than yours.

Best Practices for Backup and Restore

These are the few best practices recommended for Back Up and Restore option.

  1. It is always recommended to Schedule the  back up during non-office hours.
  2. Make sure that you have a minimum of  5GB space to store the back up data.
  3. Make sure that you specify a Valid destination folder.
  4. Make sure that the remote database if configured, should be running during back up.

Data Back Up

Scheduling Data Backup

You can use Endpoint Central to take a back up of the database regularly. For example, if you want to take a back up of the database everyday at 5 p.m., you can schedule it as per convenience.

To schedule back up of data, follow the steps given below:

  1. Select the Admin tab

  2. Under Database settings click Database Backup

  3. Specify the time at which you want the back up to be taken, in hour:minute:second (hh:mm:ss) format

    The time should be specified in the 24-hour format. For example, if you want the database back up to be taken at 6 p.m., the time should be specified as 18:00:00.

    1. Select the number of backup files that you want Endpoint Central to save

      Using this option you can select how many database backup files should be saved. The older backup files will be deleted. For example, if you want only 7 backup files saved, select 7. This will ensure that at all times only 7 backup files are saved.

    2. Specify the location where you want the backup files to be stored.

      Note: Follow the steps as shown to give write permission to access network share to specific server machines.

Note: It is recommended to configure the shared path in the same domain and to not provide write permission for Everyone to the shared path.

  1. Check the Notify when the database backup fails checkbox

  2. Specify the email address (es) to which you want an e-mail alert to be sent if the database back up fails. Please note that you should have configured your mail server settings to get notified.

    Ensure that you have configured your mail server settings to receive notifications.

  3. Click Save Changes

You have scheduled an automatic data backup to take place automatically at a specified time.

Manual Data Backup

You can manually back up and restore the database. You can do this using the Backup-Restore Utility GUI.

Opening the Backup-Restore Utility Graphical User Interface (GUI)

To open the Backup-Restore Utility GUI, follow the steps given below:

  1. Right click Start -->Explore --> directory where DC server folder is present -->bin. 

    (For example, right click Start -->Explore -->Local Disk (C:) -->Program Files -->DesktopCentral_Server -->bin)
  2. Double-click backuprestore.bat

You've opened the Backup-Restore Utility GUI.

  1. On the Backup-Restore Utility GUI, click the Backup tab

  2. Select the location where you want to save the backup file

  3. Click Backup

  4. You can choose to encrypt the backup file by providing a password.

A backup file is created and saved in the specified location. The file will be named using the buildnumber-date-time.zip format. For example, 70120-Oct-25-2010-13-26.zip where 70120 is the build number, Oct 25th 2010 is the date and 13:26 is the time.

VM Backup

In case you are using Endpoint Central in bundled PGSQL DB, you can restore Endpoint Central with the server machine via VM snapshot and start the server. Even then, Endpoint Central's scheduled backup is the primary backup and cannot be stopped.

If you are using MSSQL or remote PGSQL you should not use this VM restore as the database will be in another machine. If you do so, the server will not start due to data inconsistency.

MSSQL BAK Backup

Follow the steps below to grant the necessary permissions for MSSQL BAK backup: 

  1. Database permissions
    1. "CREATE ANY DATABASE"
      • This access is required in order to restore databases. For further information, please refer this Microsoft document.
      • Microsoft suggests executing the following query to grant this access.  Run these queries as a super admin:
        "Use master;
        GRANT CREATE ANY DATABASE TO user_name;
        GO" 
        Example
        Use master;
        GRANT CREATE ANY DATABASE TO dcuser;
        GO
      • This CREATE ANY DATABASE privilege allows the user to create a database and the user has authorization over only the databases created by it and if they are db_owner of the database.
      • An alternative would be to provide user with db_creator role but that user will a have access to alter any database.
    2. "db_owner"
      • This permission is required to backup and restore an already existing database.  Kindly refer to this Microsoft document to know more.
      • Microsoft suggests executing the following query to grant this access.  Run these queries as a super admin: 
        "Use master;
        ALTER AUTHORIZATION ON DATABASE::database_name TO user_name;
        GO" 
      • Example : 
            Use master
            ALTER AUTHORIZATION ON DATABASE::desktopcentral TO dcuser;
            GO
      • This permission gives db_owner access to the user.
  1. Folder Permissions
    Follow the procedures below to grant write permission to the ScheduledDBBackup folder in the sql server's application server installation location. Note: We can provide permissions to a particular user or computer only when both the machines are in the same domain.
    1. Open the application server installation directory.
    2. For example, right click Start -->Explore -->Local Disk (C:) -->Program Files -->DesktopCentral_Server.
    3. Right click on ScheduledDBBackup.
    4. Navigate to the Security tab, click Edit to change permissions and click add
    5. Click on Object types and check computers on and click OK
    6. Click on 'Locations', choose 'Entire Directory' and click OK
    7. Enter the object names, the SQL Server Service logon user if it is a user or the machine name if the logon user is not an actual user eg: SYSTEM or NT Service\SQLSERVER. Click on 'CheckNames'.
    8. Select the required objects and click OK.
    9. Click OK to navigate to the Permissions for ScheduledDBBackup window.
    10. Choose the respective users or computers added before and grant access for full control and modify. 
    11. Click Apply and then OK.
    12. In the scheduleDBBackup properties window, Navigate to the sharing tab and click share under Network File and Folder Sharing.
    13. Choose the respective users or computers and provide write access and click Share.
    14. Ensure that the share path is host-name/ScheduledDBBackup and click Done and Close.

Restoring a backup file

Note: This document only provides steps for backup restoration on an already working server. If you only have a backup file and want to re-install and setup the Endpoint Central server, then please follow the instructions given in this document.

You can manually back up and restore the database. You can do this using the Backup-Restore Utility GUI.

Opening the Backup-Restore Utility Graphical User Interface (GUI)

To open the Backup-Restore Utility GUI, follow the steps given below:

      1. Right click Start -->Explore --> directory where DC server folder is present -->bin

        (For example, right click Start -->Explore -->Local Disk (C:) -->Program Files -->DesktopCentral_Server -->bin)
      2. Double-click backuprestore.bat

You've opened the Backup-Restore Utility GUI.

Ensure that you have stopped the Endpoint Central server service before restoring a backup file.

  1. On the Backup-Restore Utility GUI, click the Restore tab

  2. Browse and select the required backup file.

  3. Click Restore

  4. In case you have opted for encrypting the backup file, you will have to provide the password for restoring the backup.

    The build number of the Endpoint Central server should match the build number of the backup file you are restoring. Ensure that you choose the correct architecture of the installation, such as 32-bit or 64-bit. You can verify the details by viewing the Support tab, on the web console.

Note:The restoration time depends on the data stored on the database. The progress bar will provide the restoration status. In case of any errors in the restoration, an error message will be notified to the user.

 

This will restore the specified data to Endpoint Central server.

 

If remote database is configured with the Endpoint Central server, ensure that it is running on a remote machine. After restoration, the changes made after the backup date will not be available.