1. Packages
  2. Packages
  3. Planetscale Provider
  4. API Docs
  5. PostgresBranchBackup
Viewing docs for planetscale 1.2.0
published on Tuesday, Jun 16, 2026 by planetscale
Viewing docs for planetscale 1.2.0
published on Tuesday, Jun 16, 2026 by planetscale

    PostgresBranchBackup Resource

    Create PostgresBranchBackup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PostgresBranchBackup(name: string, args: PostgresBranchBackupArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresBranchBackup(resource_name: str,
                             args: PostgresBranchBackupArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresBranchBackup(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             branch: Optional[str] = None,
                             database: Optional[str] = None,
                             organization: Optional[str] = None,
                             emergency: Optional[bool] = None,
                             name: Optional[str] = None,
                             retention_unit: Optional[str] = None,
                             retention_value: Optional[float] = None)
    func NewPostgresBranchBackup(ctx *Context, name string, args PostgresBranchBackupArgs, opts ...ResourceOption) (*PostgresBranchBackup, error)
    public PostgresBranchBackup(string name, PostgresBranchBackupArgs args, CustomResourceOptions? opts = null)
    public PostgresBranchBackup(String name, PostgresBranchBackupArgs args)
    public PostgresBranchBackup(String name, PostgresBranchBackupArgs args, CustomResourceOptions options)
    
    type: planetscale:PostgresBranchBackup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "planetscale_postgresbranchbackup" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PostgresBranchBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PostgresBranchBackupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PostgresBranchBackupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresBranchBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresBranchBackupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var postgresBranchBackupResource = new Planetscale.PostgresBranchBackup("postgresBranchBackupResource", new()
    {
        Branch = "string",
        Database = "string",
        Organization = "string",
        Emergency = false,
        Name = "string",
        RetentionUnit = "string",
        RetentionValue = 0,
    });
    
    example, err := planetscale.NewPostgresBranchBackup(ctx, "postgresBranchBackupResource", &planetscale.PostgresBranchBackupArgs{
    	Branch:         pulumi.String("string"),
    	Database:       pulumi.String("string"),
    	Organization:   pulumi.String("string"),
    	Emergency:      pulumi.Bool(false),
    	Name:           pulumi.String("string"),
    	RetentionUnit:  pulumi.String("string"),
    	RetentionValue: pulumi.Float64(0),
    })
    
    resource "planetscale_postgresbranchbackup" "postgresBranchBackupResource" {
      branch          = "string"
      database        = "string"
      organization    = "string"
      emergency       = false
      name            = "string"
      retention_unit  = "string"
      retention_value = 0
    }
    
    var postgresBranchBackupResource = new PostgresBranchBackup("postgresBranchBackupResource", PostgresBranchBackupArgs.builder()
        .branch("string")
        .database("string")
        .organization("string")
        .emergency(false)
        .name("string")
        .retentionUnit("string")
        .retentionValue(0.0)
        .build());
    
    postgres_branch_backup_resource = planetscale.PostgresBranchBackup("postgresBranchBackupResource",
        branch="string",
        database="string",
        organization="string",
        emergency=False,
        name="string",
        retention_unit="string",
        retention_value=float(0))
    
    const postgresBranchBackupResource = new planetscale.PostgresBranchBackup("postgresBranchBackupResource", {
        branch: "string",
        database: "string",
        organization: "string",
        emergency: false,
        name: "string",
        retentionUnit: "string",
        retentionValue: 0,
    });
    
    type: planetscale:PostgresBranchBackup
    properties:
        branch: string
        database: string
        emergency: false
        name: string
        organization: string
        retentionUnit: string
        retentionValue: 0
    

    PostgresBranchBackup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PostgresBranchBackup resource accepts the following input properties:

    Branch string
    The name of the branch. Requires replacement if changed.
    Database string
    The name of the database the branch belongs to. Requires replacement if changed.
    Organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    Emergency bool
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    Name string
    Name for the backup. Requires replacement if changed.
    RetentionUnit string
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    RetentionValue double
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    Branch string
    The name of the branch. Requires replacement if changed.
    Database string
    The name of the database the branch belongs to. Requires replacement if changed.
    Organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    Emergency bool
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    Name string
    Name for the backup. Requires replacement if changed.
    RetentionUnit string
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    RetentionValue float64
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    branch string
    The name of the branch. Requires replacement if changed.
    database string
    The name of the database the branch belongs to. Requires replacement if changed.
    organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    emergency bool
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    name string
    Name for the backup. Requires replacement if changed.
    retention_unit string
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    retention_value number
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    branch String
    The name of the branch. Requires replacement if changed.
    database String
    The name of the database the branch belongs to. Requires replacement if changed.
    organization String
    The name of the organization the branch belongs to. Requires replacement if changed.
    emergency Boolean
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    name String
    Name for the backup. Requires replacement if changed.
    retentionUnit String
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    retentionValue Double
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    branch string
    The name of the branch. Requires replacement if changed.
    database string
    The name of the database the branch belongs to. Requires replacement if changed.
    organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    emergency boolean
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    name string
    Name for the backup. Requires replacement if changed.
    retentionUnit string
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    retentionValue number
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    branch str
    The name of the branch. Requires replacement if changed.
    database str
    The name of the database the branch belongs to. Requires replacement if changed.
    organization str
    The name of the organization the branch belongs to. Requires replacement if changed.
    emergency bool
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    name str
    Name for the backup. Requires replacement if changed.
    retention_unit str
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    retention_value float
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    branch String
    The name of the branch. Requires replacement if changed.
    database String
    The name of the database the branch belongs to. Requires replacement if changed.
    organization String
    The name of the organization the branch belongs to. Requires replacement if changed.
    emergency Boolean
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    name String
    Name for the backup. Requires replacement if changed.
    retentionUnit String
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    retentionValue Number
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PostgresBranchBackup resource produces the following output properties:

    Actor PostgresBranchBackupActor
    BackupPolicy PostgresBranchBackupBackupPolicy
    CompletedAt string
    When the backup completed
    DatabaseBranch PostgresBranchBackupDatabaseBranch
    DeletedAt string
    When the backup was deleted
    EstimatedStorageCost double
    The estimated storage cost of the backup
    ExpiresAt string
    When the backup expires
    Id string
    The provider-assigned unique ID for this managed resource.
    Protected bool
    Whether or not the backup is protected from deletion
    PvcSize double
    Size of the PVC used for the backup
    Size double
    The size of the backup in bytes
    StartedAt string
    When the backup started
    State string
    The current state of the backup
    Actor PostgresBranchBackupActor
    BackupPolicy PostgresBranchBackupBackupPolicy
    CompletedAt string
    When the backup completed
    DatabaseBranch PostgresBranchBackupDatabaseBranch
    DeletedAt string
    When the backup was deleted
    EstimatedStorageCost float64
    The estimated storage cost of the backup
    ExpiresAt string
    When the backup expires
    Id string
    The provider-assigned unique ID for this managed resource.
    Protected bool
    Whether or not the backup is protected from deletion
    PvcSize float64
    Size of the PVC used for the backup
    Size float64
    The size of the backup in bytes
    StartedAt string
    When the backup started
    State string
    The current state of the backup
    actor object
    backup_policy object
    completed_at string
    When the backup completed
    database_branch object
    deleted_at string
    When the backup was deleted
    estimated_storage_cost number
    The estimated storage cost of the backup
    expires_at string
    When the backup expires
    id string
    The provider-assigned unique ID for this managed resource.
    protected bool
    Whether or not the backup is protected from deletion
    pvc_size number
    Size of the PVC used for the backup
    size number
    The size of the backup in bytes
    started_at string
    When the backup started
    state string
    The current state of the backup
    actor PostgresBranchBackupActor
    backupPolicy PostgresBranchBackupBackupPolicy
    completedAt String
    When the backup completed
    databaseBranch PostgresBranchBackupDatabaseBranch
    deletedAt String
    When the backup was deleted
    estimatedStorageCost Double
    The estimated storage cost of the backup
    expiresAt String
    When the backup expires
    id String
    The provider-assigned unique ID for this managed resource.
    protected_ Boolean
    Whether or not the backup is protected from deletion
    pvcSize Double
    Size of the PVC used for the backup
    size Double
    The size of the backup in bytes
    startedAt String
    When the backup started
    state String
    The current state of the backup
    actor PostgresBranchBackupActor
    backupPolicy PostgresBranchBackupBackupPolicy
    completedAt string
    When the backup completed
    databaseBranch PostgresBranchBackupDatabaseBranch
    deletedAt string
    When the backup was deleted
    estimatedStorageCost number
    The estimated storage cost of the backup
    expiresAt string
    When the backup expires
    id string
    The provider-assigned unique ID for this managed resource.
    protected boolean
    Whether or not the backup is protected from deletion
    pvcSize number
    Size of the PVC used for the backup
    size number
    The size of the backup in bytes
    startedAt string
    When the backup started
    state string
    The current state of the backup
    actor PostgresBranchBackupActor
    backup_policy PostgresBranchBackupBackupPolicy
    completed_at str
    When the backup completed
    database_branch PostgresBranchBackupDatabaseBranch
    deleted_at str
    When the backup was deleted
    estimated_storage_cost float
    The estimated storage cost of the backup
    expires_at str
    When the backup expires
    id str
    The provider-assigned unique ID for this managed resource.
    protected bool
    Whether or not the backup is protected from deletion
    pvc_size float
    Size of the PVC used for the backup
    size float
    The size of the backup in bytes
    started_at str
    When the backup started
    state str
    The current state of the backup
    actor Property Map
    backupPolicy Property Map
    completedAt String
    When the backup completed
    databaseBranch Property Map
    deletedAt String
    When the backup was deleted
    estimatedStorageCost Number
    The estimated storage cost of the backup
    expiresAt String
    When the backup expires
    id String
    The provider-assigned unique ID for this managed resource.
    protected Boolean
    Whether or not the backup is protected from deletion
    pvcSize Number
    Size of the PVC used for the backup
    size Number
    The size of the backup in bytes
    startedAt String
    When the backup started
    state String
    The current state of the backup

    Look up Existing PostgresBranchBackup Resource

    Get an existing PostgresBranchBackup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PostgresBranchBackupState, opts?: CustomResourceOptions): PostgresBranchBackup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actor: Optional[PostgresBranchBackupActorArgs] = None,
            backup_policy: Optional[PostgresBranchBackupBackupPolicyArgs] = None,
            branch: Optional[str] = None,
            completed_at: Optional[str] = None,
            database: Optional[str] = None,
            database_branch: Optional[PostgresBranchBackupDatabaseBranchArgs] = None,
            deleted_at: Optional[str] = None,
            emergency: Optional[bool] = None,
            estimated_storage_cost: Optional[float] = None,
            expires_at: Optional[str] = None,
            name: Optional[str] = None,
            organization: Optional[str] = None,
            protected: Optional[bool] = None,
            pvc_size: Optional[float] = None,
            retention_unit: Optional[str] = None,
            retention_value: Optional[float] = None,
            size: Optional[float] = None,
            started_at: Optional[str] = None,
            state: Optional[str] = None) -> PostgresBranchBackup
    func GetPostgresBranchBackup(ctx *Context, name string, id IDInput, state *PostgresBranchBackupState, opts ...ResourceOption) (*PostgresBranchBackup, error)
    public static PostgresBranchBackup Get(string name, Input<string> id, PostgresBranchBackupState? state, CustomResourceOptions? opts = null)
    public static PostgresBranchBackup get(String name, Output<String> id, PostgresBranchBackupState state, CustomResourceOptions options)
    resources:  _:    type: planetscale:PostgresBranchBackup    get:      id: ${id}
    import {
      to = planetscale_postgresbranchbackup.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Actor PostgresBranchBackupActor
    BackupPolicy PostgresBranchBackupBackupPolicy
    Branch string
    The name of the branch. Requires replacement if changed.
    CompletedAt string
    When the backup completed
    Database string
    The name of the database the branch belongs to. Requires replacement if changed.
    DatabaseBranch PostgresBranchBackupDatabaseBranch
    DeletedAt string
    When the backup was deleted
    Emergency bool
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    EstimatedStorageCost double
    The estimated storage cost of the backup
    ExpiresAt string
    When the backup expires
    Name string
    Name for the backup. Requires replacement if changed.
    Organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    Protected bool
    Whether or not the backup is protected from deletion
    PvcSize double
    Size of the PVC used for the backup
    RetentionUnit string
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    RetentionValue double
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    Size double
    The size of the backup in bytes
    StartedAt string
    When the backup started
    State string
    The current state of the backup
    Actor PostgresBranchBackupActorArgs
    BackupPolicy PostgresBranchBackupBackupPolicyArgs
    Branch string
    The name of the branch. Requires replacement if changed.
    CompletedAt string
    When the backup completed
    Database string
    The name of the database the branch belongs to. Requires replacement if changed.
    DatabaseBranch PostgresBranchBackupDatabaseBranchArgs
    DeletedAt string
    When the backup was deleted
    Emergency bool
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    EstimatedStorageCost float64
    The estimated storage cost of the backup
    ExpiresAt string
    When the backup expires
    Name string
    Name for the backup. Requires replacement if changed.
    Organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    Protected bool
    Whether or not the backup is protected from deletion
    PvcSize float64
    Size of the PVC used for the backup
    RetentionUnit string
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    RetentionValue float64
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    Size float64
    The size of the backup in bytes
    StartedAt string
    When the backup started
    State string
    The current state of the backup
    actor object
    backup_policy object
    branch string
    The name of the branch. Requires replacement if changed.
    completed_at string
    When the backup completed
    database string
    The name of the database the branch belongs to. Requires replacement if changed.
    database_branch object
    deleted_at string
    When the backup was deleted
    emergency bool
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    estimated_storage_cost number
    The estimated storage cost of the backup
    expires_at string
    When the backup expires
    name string
    Name for the backup. Requires replacement if changed.
    organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    protected bool
    Whether or not the backup is protected from deletion
    pvc_size number
    Size of the PVC used for the backup
    retention_unit string
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    retention_value number
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    size number
    The size of the backup in bytes
    started_at string
    When the backup started
    state string
    The current state of the backup
    actor PostgresBranchBackupActor
    backupPolicy PostgresBranchBackupBackupPolicy
    branch String
    The name of the branch. Requires replacement if changed.
    completedAt String
    When the backup completed
    database String
    The name of the database the branch belongs to. Requires replacement if changed.
    databaseBranch PostgresBranchBackupDatabaseBranch
    deletedAt String
    When the backup was deleted
    emergency Boolean
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    estimatedStorageCost Double
    The estimated storage cost of the backup
    expiresAt String
    When the backup expires
    name String
    Name for the backup. Requires replacement if changed.
    organization String
    The name of the organization the branch belongs to. Requires replacement if changed.
    protected_ Boolean
    Whether or not the backup is protected from deletion
    pvcSize Double
    Size of the PVC used for the backup
    retentionUnit String
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    retentionValue Double
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    size Double
    The size of the backup in bytes
    startedAt String
    When the backup started
    state String
    The current state of the backup
    actor PostgresBranchBackupActor
    backupPolicy PostgresBranchBackupBackupPolicy
    branch string
    The name of the branch. Requires replacement if changed.
    completedAt string
    When the backup completed
    database string
    The name of the database the branch belongs to. Requires replacement if changed.
    databaseBranch PostgresBranchBackupDatabaseBranch
    deletedAt string
    When the backup was deleted
    emergency boolean
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    estimatedStorageCost number
    The estimated storage cost of the backup
    expiresAt string
    When the backup expires
    name string
    Name for the backup. Requires replacement if changed.
    organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    protected boolean
    Whether or not the backup is protected from deletion
    pvcSize number
    Size of the PVC used for the backup
    retentionUnit string
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    retentionValue number
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    size number
    The size of the backup in bytes
    startedAt string
    When the backup started
    state string
    The current state of the backup
    actor PostgresBranchBackupActorArgs
    backup_policy PostgresBranchBackupBackupPolicyArgs
    branch str
    The name of the branch. Requires replacement if changed.
    completed_at str
    When the backup completed
    database str
    The name of the database the branch belongs to. Requires replacement if changed.
    database_branch PostgresBranchBackupDatabaseBranchArgs
    deleted_at str
    When the backup was deleted
    emergency bool
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    estimated_storage_cost float
    The estimated storage cost of the backup
    expires_at str
    When the backup expires
    name str
    Name for the backup. Requires replacement if changed.
    organization str
    The name of the organization the branch belongs to. Requires replacement if changed.
    protected bool
    Whether or not the backup is protected from deletion
    pvc_size float
    Size of the PVC used for the backup
    retention_unit str
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    retention_value float
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    size float
    The size of the backup in bytes
    started_at str
    When the backup started
    state str
    The current state of the backup
    actor Property Map
    backupPolicy Property Map
    branch String
    The name of the branch. Requires replacement if changed.
    completedAt String
    When the backup completed
    database String
    The name of the database the branch belongs to. Requires replacement if changed.
    databaseBranch Property Map
    deletedAt String
    When the backup was deleted
    emergency Boolean
    Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. Requires replacement if changed.
    estimatedStorageCost Number
    The estimated storage cost of the backup
    expiresAt String
    When the backup expires
    name String
    Name for the backup. Requires replacement if changed.
    organization String
    The name of the organization the branch belongs to. Requires replacement if changed.
    protected Boolean
    Whether or not the backup is protected from deletion
    pvcSize Number
    Size of the PVC used for the backup
    retentionUnit String
    Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
    retentionValue Number
    Value between 1 and 1000 for the retention period of the backup (i.e retentionvalue 6 and retentionunit hour means 6 hours). Requires replacement if changed.
    size Number
    The size of the backup in bytes
    startedAt String
    When the backup started
    state String
    The current state of the backup

    Supporting Types

    PostgresBranchBackupActor, PostgresBranchBackupActorArgs

    Id string
    The ID of the actor
    Id string
    The ID of the actor
    id string
    The ID of the actor
    id String
    The ID of the actor
    id string
    The ID of the actor
    id str
    The ID of the actor
    id String
    The ID of the actor

    PostgresBranchBackupBackupPolicy, PostgresBranchBackupBackupPolicyArgs

    Id string
    The ID of the backup policy
    Id string
    The ID of the backup policy
    id string
    The ID of the backup policy
    id String
    The ID of the backup policy
    id string
    The ID of the backup policy
    id str
    The ID of the backup policy
    id String
    The ID of the backup policy

    PostgresBranchBackupDatabaseBranch, PostgresBranchBackupDatabaseBranchArgs

    Id string
    The ID for the resource
    Name string
    The name for the resource
    Id string
    The ID for the resource
    Name string
    The name for the resource
    id string
    The ID for the resource
    name string
    The name for the resource
    id String
    The ID for the resource
    name String
    The name for the resource
    id string
    The ID for the resource
    name string
    The name for the resource
    id str
    The ID for the resource
    name str
    The name for the resource
    id String
    The ID for the resource
    name String
    The name for the resource

    Import

    In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:

    terraform

    import {

    to = planetscale_postgres_branch_backup.my_planetscale_postgres_branch_backup

    id = jsonencode({

    branch       = "..."
    
    database     = "..."
    
    id           = "..."
    
    organization = "..."
    

    })

    }

    The pulumi import command can be used, for example:

    $ pulumi import planetscale:index/postgresBranchBackup:PostgresBranchBackup my_planetscale_postgres_branch_backup '{"branch": "...", "database": "...", "id": "...", "organization": "..."}'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    planetscale planetscale/terraform-provider-planetscale
    License
    Notes
    This Pulumi package is based on the planetscale Terraform Provider.
    Viewing docs for planetscale 1.2.0
    published on Tuesday, Jun 16, 2026 by planetscale

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial