Scheduling OCI Database with PostgreSQL Backups

Schedule automatic backups of an OCI Database with PostgreSQL database system.

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.

When you schedule automated backups, you can also specify that copies of the backup are distributed to another region. You can use a backup that's been replicated to a second region to provision a database system if the primary database system is unavailable.

    1. On the Database systems list page, select the database system that you want to work with. If you need help finding the list page or the database system, see Listing OCI Database with PostgreSQL Database Systems.
      The database system's details page opens.
    2. From the Actions menu, select select Edit management policy.
      The Edit management policy panel opens.
    3. Select Enable automatic backups.
      The Enable automatic backups panel opens.
    4. Enter the following information:
      • Automatic backups: Select Enable automatic backups to enable automatic backups. If you don't select automatic backups, you must manage backups manually. We recommend that you enable automatic backups. After enabling automatic backups, you can set the following options:
        • Backup frequency: Select how often a backup is created.
        • Day of the (time period): Select the day that the backup is created.
        • Backup start time (UTC): Select the time that the backup is created.
        • Backup retention period (days): Enter the number of days that the backup is retained before it's deleted by the system.
      • Enable backup copy: Select to automatically create copies of the backup in another region.
        • Compartment: Select a compartment for the backup copy.
        • Regions: Select a region or regions for the backup copy.
        • Backup retention period (days): Enter the number of days that the backup copy is retained before it's deleted by the system.
    5. Select 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.