Creating an OCI Database with PostgreSQL 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.
Note

If you're creating the database system in a new region, such as when using a backup copied to another region for disaster recovery, you might need to create a configuration in that region as well. If you don't select a custom configuration for the database system, the default configuration is applied.

For more information, see OCI Database with PostgreSQL Database System Backups.

    1. On the Database systems list page, select Create PostgreSQL Database system. If you need help finding the list page, see Listing OCI Database with PostgreSQL Database Systems.
      The Create PostgreSQL Database system wizard opens. The wizard contains the following sections:
      • 1. Select create type
      • 2. Configure database
      • 3. Management policy
      • 4. Review and create
    2. In the Create PostgreSQL Database system page, select Create Database system from backup.

    1. Select creation type

    Select Create Database system from backup.

    Note

    To create a new database system, see Creating an OCI Database with PostgreSQL Database System.

    Enter the following information:

    • Backup compartment: Select the compartment containing the backup you want to use from the list.
    • Backup: Select the backup residing in the compartment that you want to use from the list.

    Choose backup

    Use the Filters section to find the backup that you want to use to create the database system. Select from the following options:

    • Date range: Filter backups using Start date and End date.
    • Backup type: Filter backups based on the following types:
      • Manual backup
      • Automatic backup:
      • Copied backup

    Select Next. The Configure database section opens.

    2. Configure database

    Complete the following sections.

    Database configuration

    Enter the following information:

    • Database system name: Enter a name for the database system.
    • Description: (Optional) Enter a description for the database system.
    • Compartment: Select the compartment where the database system resides from the list.
    • PostgreSQL major version: Select a major version of the PostgreSQL database from the list.

    Advanced options

    Under Tags, select Add tag to apply tagging to your database system.

    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.

    Database system

    Enter the following information:

    • Node count: Enter the number of nodes you want. One primary node is required. Extra nodes are reserved as read replica nodes.
    • Performance tier: Select the performance tier for the database. The default value is 75,000 IOPS. For more information, see OCI Database with PostgreSQL Performance Tiers.
    • Data placement: Select one of the following options:
      • Availability Domain-specific: Data is durably stored in the selected availability domain.
      • Regional: Data is durably stored in multiple availability domains in the region.
    • Availability domain: Select an availability domain from the options presented.

    Hardware configuration

    Enter the following information:

    • Hardware type: Select one of the following hardware type options:
      • AMD: Flexible OCPU count. Current generation AMD processors.
      • Intel: Flexible OCPU count. Current generation Intel processors.

      The hardware type you select determines which shapes are available to you.

    • Filter shapes: Select of the following options:
      • Show all
      • Flex: Allows you to configure the amount of OCPU and memory.
      • Fixed: Come with a set values for OCPU and memory.
    • Select a shape: Select a shape from the list.

    Configure extensions

    As an option, you can select an existing database configuration for your database system, or create a new configuration compatible with the shape you selected.

    Enter the following information:

    • Create new configuration and extensions: Select to create a new configuration and extensions. The Create configuration wizard opens. For more information, see Creating an OCI Database with PostgreSQL Configuration. The new configuration and extensions you create appears in the Configuration and extensions list
    • Configuration and extensions compartment: Select the compartment containing the configuration and extensions you want.
    • Configuration and extensions: Select the Configuration and extensions contained in the compartment you selected from the list.

    Network configuration

    Here you configure the virtual cloud network (VCN) and subnet where the database system endpoint is attached. The database system endpoint uses a private IP address and isn't directly accessible from the internet.

    Enter the following information:

    • Compartment: Select the compartment containing the VCN and subnet you must select.
    • Virtual Cloud Network: Select the VCN in which you want to create the database system. If you need to create a VCN, select create a VCN and see VCN and Subnet Management.
    • Subnet: Select the private subnet of the selected VCN.
    • Private IP address: (Optional) Provide a 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 to enable a single read-only endpoint for the database system. For more information, see Enabling or Disabling the OCI Database with PostgreSQL Database System's Reader Endpoint.
    • Use network security groups to control traffic: Select 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.

    Database system administrator credentials

    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.

    Select one of the following options and enter the required information:

    • Input password:
      • Password: Specify the administrator password.
    • Use OCI Vault:
      • Compartment: Select the compartment where the OCI Vault resides.
      • Vault: Select the vault that contains the administrator password.
      • Secret: Select the secret containing the administrator password.
      • Secret version: Select a secret version.

      For more information, see Vault.

    Select Next. The Management policy section opens.

    3. Management policy

    The Management policy section gives you the opportunity to specify backup, maintenance, and replication policies for the database system.

    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. Select the period of time (Daily, Weekly, Monthly) from the list. Select the backup time of day in 30 minute intervals from the list. All times are UTC.
      • 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 Enable backup copy to automatically copy backups to another region. After enabling backup copies, you can set the following options:
      • Compartment: Select a compartment for the backup copy to reside.
      • Regions: Select one or more 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.
    • Maintenance type: Select one of the following options:
      • 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.

    Select Next. The Review and create section opens.

    4. Review and create

    Review the database system configuration, then select Create. You can select Edit to change the setup in a particular section. You can also select Previous to return to a particular section to make changes.

  • 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.