Creating a Database System from a Backup

Create a new database system from an existing backup in OCI Database with PostgreSQL.

Caution

Database systems can only be created in subnets that don't have IPv6 enabled. If you select an existing subnet with IPv6 enabled, database system creation fails.

For more information, see Managing Backups of an OCI Database with PostgreSQL.

    1. Open the navigation menu and select Databases. Under PostgreSQL, select DB Systems.
    2. (Optional) In the List scope section, under Compartment, select a compartment.
    3. Click Create PostgreSQL DB system.
    4. In the Create PostgreSQL DBSystem screen, select Create DBSystem from backup.
    5. (Optional) Use the Filters section to find the backup that you want to use to create the database system. Choose from:
      • Date range: Filter backups using Start date and End date.
      • Backup type: Filter backups by whether they were created manually or automatically.
    6. Select the database system backup that you want to use to create the new database system, then click Next.
    7. Set the Database Configuration by providing values for the following:
      • Database system name: Enter a name for the database system.
      • Description: Optionally, enter a description for the database system.
      • PostgreSQL major version: Select a major version of the PostgreSQL database.
    8. In the Database system section, enter a value for Node count. One primary node is required. Extra nodes are reserved as read replica nodes.
    9. Performance tier: Select the performance tier for the database. The default value is 75,000 IOPS. For more information, see Performance Tiers.
    10. Select an option for Data placement:
      • Regional: Data is durably stored in multiple availability domains in the region.
      • Availability Domain-specific: Data is durably stored in the selected availability domain.
    11. Set the Hardware configuration for the database system using the following:
      • OCPU count: Choose the number of OCPUs per node.
      • Available Shapes: Select the shape of the database nodes.
    12. Set the Network configuration of the database system by providing values for the following:
      • Virtual Cloud Network: Select the VCN in which you want to create the database system. If you need to create a VCN, click create a VCN and see VCN and Subnet Management.
      • Subnet: Choose the private subnet of the selected VCN.
      • Provide an available Private IP address in the specified subnet of the database system. If you don't provide an address, the service chooses an address for you.
      • Enable reader endpoint: Select this option to enable a single read-only endpoint for the database system. For more information, see Enabling or Disabling the Database System Reader Endpoint.
      • Use network security groups to control traffic: Enable this option to add this database system to an existing network security group. Select an NSG from the list, and select Add another network security group if needed.

        Important

        Security lists applied on the selected subnet or NSG you select must be configured to allow traffic to the database system's VNIC using specific protocols and ports.
    13. Provide the Database system administrator credentials to the database. Administrators don't get superuser access. An OCI Database with PostgreSQL admin user can create users and roles.
      1. Username: Specify the username of the administrator. This value can't be changed after the database system is created.
      2. Choose one of the following Password options:
        • Input password:
          1. Password: Specify the administrator password.
          2. Confirm password: Confirm the administrator password.
        • Use OCI Vault:
          1. Vault: Select the vault that contains the administrator password.
          2. Secret: Select the secret containing the administrator password.
          3. Secret version: Select a secret version.
    14. The Management policy section gives you the opportunity to specify backup and maintenance policies for the database system:
      1. 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: How often a backup is created.
        • Day of the week: The day of the week that the backup is created.
        • Backup start time: 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. The default value is 35 days.
      2. Maintenance: Select a Maintenance type option. For more information, see Maintenance.
        • Set by Oracle: Oracle chooses the best day and time to start any essential maintenance.
        • Schedule your own maintenance: Specify the day of the week and the maintenance start time (in UTC timezone) that you want to schedule any essential maintenance activity, such as OS or instance upgrades. If you don't specify a day and time, Oracle chooses it for you.
    15. (Optional) Select Show advanced options to set parameters or add tags for the database system.
    16. (Optional) Configurations: Select an existing database configuration.
    17. (Optional) Tags: If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you're not sure whether to apply tags, skip this option or ask an administrator. You can apply tags later.
    18. After configuring the database system, select Next.
    19. Review the database system configuration, then select Create.
  • Use the oci psql db-system create-db-system-backup-source-details command and required parameters to create a database system from a backup:

    oci psql db-system create-db-system-backup-source-details --compartment-id <compartment_OCID> --db-version <db_version> --display-name <display_name> --network-details <file://network-details.json> --shape <shape> --source-backup-id <source_backup_OCID> --storage-details <file://storage-details.json> --system-type <system_type> [OPTIONS]

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

  • Run the CreateDbSystem operation and use SourceDetails to specify a backup to create a database system from the backup.

    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.