This section describes how to create a backup schedule for the Salt Master node using the Backupninja utility. By default, Backupninja runs daily at 1:00 AM.
To create a backup schedule for the Salt Master node using Backupninja:
Log in to the Salt Master node.
In cluster/infra/config/init.yml
, verify that the following classes
and parameters are present:
classes:
- system.backupninja.client.single
- system.openssh.client.root
parameters:
_param:
backupninja_backup_host: <IP>
salt:
master:
backup: true
minion:
backup: true
Note
The backupninja_backup_host
parameter is the IP address or the
host name of a node running the backupninja
server. To obtain
this IP address or host name, run
salt -C 'I@backupninja:server' grains.item fqdn_ip4
or
salt -C 'I@backupninja:server' grains.item fqdn
respectively.
In cluster/infra/backup/server.yml
, verify that the following class
is present:
classes:
- system.backupninja.server.single
Optionally, override the default configuration of the backup schedule as described in Configure a backup schedule for the Salt Master node.
Apply the salt.minion state:
salt -C 'I@backupninja:server or I@backupninja:client' state.sls salt.minion
Refresh grains and mine for the backupninja
client node:
salt -C 'I@backupninja:client' state.sls salt.minion.grains
salt -C 'I@backupninja:client' mine.update
Apply the backupninja
state to the backupninja
client node:
salt -C 'I@backupninja:client' state.sls backupninja
Refresh grains on the backupninja
server node:
salt -C 'I@backupninja:server' state.sls salt.minion.grains
Apply the backupninja
state to the backupninja
server node:
salt -C 'I@backupninja:server' state.sls backupninja
Once you perform the procedure, two backup configuration scripts should be created.