How do I schedule auxiliary database backups?

CAUTION 

CAUTION

Service Disruption

Consider the directory path when you configure the Backup Location parameter.

You must specify the absolute path of a directory in a partition other than the partition that contains the database data.

Note: An auxiliary database backup fails unless all members of the local auxiliary database cluster are operational and available.

Steps
 

Record the current auxiliary database administrator password and store it in a secure location for safekeeping.

The password is required if you change a database user password and then subsequently need to restore the database.

Note: If you subsequently change the administrator password, ensure that you update the recorded password.


Log in to a station that has access to the NSP cluster.


Open a console window.


Issue the following RESTCONF API call to create the scheduled backup scheme:

Note: In order to issue a RESTCONF API call, you require a token; see the My First NSP API Client tutorial on the Network Developer Portal for information.

POST https://address/restconf/data

where

address is the NSP advertised address

The request body is the following:

{

    "nsp-auxdb-backup:config": {

        "backup-location": "path",

        "backups-to-keep": max_backups,

        "enabled": true,

        "interval": 2,

        "sync-time": first_run

    }

}

where

path is the directory in which to store the backup files, typically /opt/nsp/nfmp/auxdb/backup

max_backups is the number of previous backups to retain; the range is 0 to 7, and the default is 2

interval is how often a backup is performed, in hours

first_run is the Unix epoch time at which the first backup is to occur; marks the start of the schedule defined by interval

Auxiliary database backups are scheduled to occur every interval hours beginning at the first_run time.


To view the status of a backup operation, perform How do I check the auxiliary database backup status? as required.


Close the console window.

End of steps