By default, Backupninja runs daily at 1.00 AM. This section describes how to override the default configuration of the backup schedule for the Salt Master node. To enable the backup schedule for the Salt Master node in your deployment, refer to Enable a backup schedule for the Salt Master node using Backupninja.
To configure a backup schedule for the Salt Master node:
Log in to the Salt Master node.
Edit the cluster/infra/config/init.yml
file as required. Select from the
following options:
Set the exact time of the backup server role to override
the default backup time. The backup_times
parameters include:
day_of_week
The day of a week to perform backups. Specify 0
for Sunday, 1
for Monday, and so on. If not set, defaults to *
.
day_of_month
The day of a month to perform backups. For example, 20
, 25
,
and so on. If not set, defaults to *
.
Note
Only day_of_week
or day_of_month
can be active at
the same time. If both are defined, day_of_week
is
prioritized.
hour
The hour to perform backups. Uses the 24-hour format.
If not defined, defaults to 1
.
minute
The minute to perform backups. For example, 5
, 10
, 59
,
and so on. If not defined, defaults to 00
.
Configuration example:
parameters:
backupninja:
enabled: true
client:
backup_times:
day_of_week: 1
hour: 15
minute: 45
Note
These settings will change the global Backupninja schedule. If not set differently for individual steps, it will run all steps in the right order. This is recommended way of defining the exact backup order.
Disable automatic backups:
parameters:
backupninja:
enabled: true
client:
auto_backup_disabled: true
Re-enable automatic backups by setting the auto_backup_disabled
parameter to false
or delete the related line in
cluster/infra/config/init.yml
:
parameters:
backupninja:
enabled: true
client:
auto_backup_disabled: false
Apply changes by performing the steps 5-10 of the Enable a backup schedule for the Salt Master node using Backupninja procedure.