Microsoft SQL database backup

This article explains how to configure the Microsoft SQL database environment using Xopero ONE.

General information

The Microsoft SQL database backup process in Xopero ONE consists of two steps:

  1. Creating a database dump using backup scripts.

  2. Backing up the database dump.

The first step is performed through Xopero ONE using the backup scripts feature. The second step is a standard file-level or image-level backup executed directly by Xopero ONE.


Backup configuration

If a file-level backup plan has already been created and is running, you can skip directly to step 6.

1

Log in to , go to the Backup tab (Plans > Backup) and click the + Add plan button in the top toolbar.

2

Select Devices from the platforms list.

3

In the next aside, select one of the available options and choose one or more devices for the plan to apply to (you can also select the plan to include all activated devices).

4

Define the name of the backup plan.

5

Configure your backup plan according to your needs (more information about the backup plan setup can be found in File-level backup and Image-level backup articles).

6

Go to the Advanced settings section and click Edit to customize additional options.

7

Scroll down to the Backup scripts section and click the Pre-task script toggle to turn it on.

8

Select the script dedicated to backing up the Microsoft SQL database environment (Windows).

9

Type your database username into the Database user field.

10

Choose the user password by opening the Password Manager, where you can either add a new password or select an existing one.

11

Set up the script arguments — it should be entered in the Script arguments field as follows:

copy_type server_name "output_dir" database1 database2 ... databaseN
  1. copy_type — defines the type of copy to be performed. You can choose one of three options: full_only, full_diff, or copy_only:

    1. full_only — always performs a full copy.

    2. full_diff — performs differential copies with periodic full copies.

    3. copy_only — creates a full database copy without affecting the regular backup cycle.

Full copies are executed according to the defined schedule. Differential copies are performed whenever differential or incremental backups are scheduled. If a file containing a differential copy is deleted, the next differential copy will be created based on the most recent full copy.

  1. server_name — the name of the Microsoft SQL server along with its instance.

  2. output_dir — the directory where database dumps will be saved. This directory must also be selected as the location to back up.

  3. database1 database2 (...) — names of databases to be backed up, separated by spaces. You can leave this parameter empty — if no database is specified, Xopero ONE will automatically back up all databases from the server specified in the database access parameters.

Example database script arguments
full_diff WINSRV-2019\SQLEXPRESS "C:\MsSQLDumps" database1 database2
12

Enable the two additional options using the checkboxes:

  1. Wait for the script to continue the task — the application will wait until the dump is ready.

  2. Fail the task if the script fails — if the script fails, the system will notify you of the backup error.

13

Double-check your settings and click Save to close the Advanced settings aside.

14

After completing the configuration, click the Save button. The protection plan will then automatically begin protecting your devices and databases according to the schedule you defined.

15

That’s all you need to do to create the database dump — this file should now be included in the Data to protect section if you are performing a file-level backup (to back up only the database). Alternatively, you can run an image-level backup to protect the entire drive.

Last updated