Note
This feature is available starting from the MCP 2019.2.5 maintenance update. Before enabling the feature, follow the steps described in Apply maintenance updates.
After you create a backup schedule, you may also need to create an instant backup of a MAAS ProgreSQL database.
To create an instant backup of a MAAS PostgreSQL database using the Backupninja service:
Verify that you have completed the steps described in Enable a backup schedule for a MAAS PostgreSQL database using Backupninja.
Select one of the following options:
Create an instant backup of a MAAS PostgreSQL database automatically as described in Create an instant backup using Backupninja pipeline.
Create an instant backup of a MAAS PostgreSQL database manually:
Verify that you have the postgresql-client-9.6
package installed
on the Salt Master node. Otherwise, install it:
salt -C 'I@backupninja:client' pkg.install postgresql-client,postgresql-client-9.6
Verify that you have completed the steps described in Enable a backup schedule for a MAAS PostgreSQL database using Backupninja.
Log in to the MAAS node, for example, cfg01
.
Make a backup of file_permissions.txt
for MAAS:
which getfacl && getfacl -pR /var/lib/maas/ > /var/lib/maas/file_permissions.txt
Compress all MAAS PostgreSQL databases and store them in
/var/backups/postgresql/
:
backupninja -n --run /etc/backup.d/102.pgsql
Move the local backup files to the backupninja
server using rsync:
backupninja -n --run /etc/backup.d/200.backup.rsync