Scheduling OCI Database with PostgreSQL Backups

Schedule automatic backups of an OCI Database with PostgreSQL.

Use the database's management policy to enable automatic, scheduled backups of a database. The management policy lets you specify the backup frequency, run time, and the retention period of the backups.

    1. Open the navigation menu and click Databases. Under PostgreSQL, click DB Systems.
    2. (Optional) In the List scope section, under Compartment, select a compartment.
    3. Click the name of the database that you want to enable automatic backups for.
    4. On the DBSystem details page, click More actions and choose Edit management policy.
    5. In the Edit management policy panel, select Enable automatic backups.
    6. After enabling automatic backups, you can set the following scheduling options:
      • Backup frequency: Choose how often a backup is created.
      • Day of the week: Choose the day of the week that the backup is created.
      • Backup start time: Choose the time that the backup is created.
      • Backup retention period (days): Enter a value, in days, that the backup will be retained before it's deleted by the system.
    7. Click Save changes.
  • Use the oci psql db-system update command and the --management-policy parameter to update the management policy of a database:

    oci psql db-system update --db-system-id <database_OCID> --management-policy <file://management-policy-details.json>[OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the UpdateDbSystem operation with the managementPolicy attribute to update the management policy of the database.

    For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.