1. Home
  2. Docs
  3. Backup Ninja
  4. User Guide
  5. Schedules
  6. Scheduling a Backup

Scheduling a Backup

To create a backup schedule, click on Schedule Backup button to open up the step-by-step configuration wizard.


In this stage, give the schedule a name under Schedule Name the textbox. Choose a server that you want to back up from the Backup Server drop-down list. If the server is not listed there, add it first under Servers  section. If you want to know how to add your server, go to Adding a New Server.


When selecting a server from the dropdown, you should notice a dot color indicator right next to the backup server name. It indicates the state of the database server as seen from the Backup Ninja whether it is online, offline, or removed. See Servers.

Only installed backup tools on the selected server will be listed. For Server that was added as a file backup, the only item that shall be found in the dropdown box for the Backup Method file is a file (beta). See Backup Methods for details.

Partial Backup or Full Backup

Backup Ninja supports partial backup and full backup for databases that we supported. Partial Backups is not available for all types of database backup methods and is only available to those backup methods that allow filtering by database and/or tables when backing up the data. Please check the full list of supported backup methods in our Partial Backups section.

For a Full Backup, this means that creating a scheduled backup for a particular database without any filter specified (i.e. databases or tables) are considered as a full backup copy of your database. This will create a backup of your database consisting of your full data.

How to Create A Partial Backup

To create a partial backup, just specify the schema/database you need to filter. Once specified, you can filter also the tables either you need to exclude it or include it for your backup policy. Take note that in every backup method that a database supports, they differ on what capability it can filter. There are backup methods that only allows filtering of database alone. Most of the backup methods we support for partial backups allow you to filter by schema/database and/or tables either exclude it or include it for your backup policy. For more information on this on the list of backup methods we support for partial backups, please check out our Partial Backups section for more details.

How to Create A Full Backup

Choose a backup method from the Backup Methods dropdown. Do not specify or just leave empty fields that are required for partial backups. This allows you to create a full backup.


Click on Add New Storage Location and you will have two options:

  • Add Local Storage – Stores the backup on any path of the backup host. This could be a local disk, remote storage mounted locally into the host, etc.
  • Add Cloud Storage – Stores the backup on the supported cloud object storage services. See Clouds for details.

One backup can be configured with more than one backup destinations, but limits only up to 15 different storage locations per backup schedule. For example, the user may choose to store a backup on both local and cloud storage, multiple cloud storage, or multiple local storage.

Both the Local and Cloud storage retention policy types allow you to choose by Days, Weeks, Months, and Years.

Local Storage

When selecting local storage, you can give the destination a name by clicking on the blue pencil icon (right next to the default local_storage naming). Whitespace in the path is allowed.

Specify the full path to the directory under Local Storage Directory. This directory will be created by Backup Ninja (or bartender) agent if not exists.

Choose the Retention Policy Type with its value accordingly. Once the retention period has been reached, it will remove the backup file from its configured location(s) or destination(s).

Cloud Storage

Select the existing credential or you can create a new one by clicking on Add Cloud Credential.

Choose the Retention Policy Type with its value accordingly. The backup will be removed when it reaches or passes this value from the configured location.


Customize the backup path and file name using the supported pattern variables under Backup Name. When editing the name, Backup Ninja will generate an example name under Filename example. The actual final name could be different depending on the backup timestamp or if compression is enabled.

Variable Description
%B Date in YYYY-MM-DD_HHmmss format. For example: 2019-10-15_150343 which equals to October 15th, 2019 at 3:03:43 PM.
%D Database name (schema), “all” means backup all databases.
%H Server hostname, as detected by the Backup Ninja agent.
%I Backup job number in integer.
%M The backup method used.
/ Directory separator.
Toggle YES or NO under Do you want to use compression?. If enabled, gzip compression will be used by default.

Toggle YES or NO under Do you want to use encryption?. A pop-up will appear if you clicked on YES to configure the encryption key. Backup Ninja supports 256-bit OFB encryption with a 64-char hexadecimal key. You can use the auto-generated key and check on I have copied the encryption key and saved it in a safe place checkbox to proceed.

Optionally, you can use your own custom key. Just select and click Use Custom Key. The value here to specify is a 64-char hexadecimal case-insensitive key. Meaning you can mix small or capital letters in the key as long as it’s in a hexadecimal format. You can use any online key generator tool as long as it contains 64 hexadecimal characters, or use openssl it to generate a random 32-byte hexadecimal key (equals to 256-bit key size), for example:

$ openssl rand -hex 32

The key must be saved and kept secure because if you lose it, you will not be able to decrypt the backup.


Backup Ninja does not store the encryption key in the cloud. You will not be able to decrypt your backups if you lose the key or if the agent configuration is lost.


Choose the backup schedule interval option. Backup Ninja supports the following interval options:

  • Minutely – Runs backup once for every selected minute.
  • Hourly – Runs backup once for every selected hour and minute.
  • Daily – Runs backup once for every selected day at the selected time.
  • Weekly – Runs backup once on the selected day(s) at the selected time.
  • Monthly – Runs backup once for every selected day of the month at the selected time.
  • Yearly – Runs backup once on the selected day, month, and time.

Backups will be scheduled to run based on the database servers’ timezone setting.

Click Schedule Backup to complete the steps. The schedule will be listed on the Schedule page. See Schedule List for more details.

Was this article helpful to you? Yes No