published on Friday, Oct 30, 2026 by ibm-cloud
published on Friday, Oct 30, 2026 by ibm-cloud
Provides a read-only data source for Backup. Supports both Classic and Gen2 (Independent Backup) instances. For more information, refer to IBM Cloud Databases Gen2 Independent Backups. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.
Example Usage
Classic
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const databaseBackup = ibm.getDatabaseBackup({
backupId: "<backup_crn>",
});
import pulumi
import pulumi_ibm as ibm
database_backup = ibm.get_database_backup(backup_id="<backup_crn>")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.GetDatabaseBackup(ctx, &ibm.GetDatabaseBackupArgs{
BackupId: "<backup_crn>",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var databaseBackup = Ibm.GetDatabaseBackup.Invoke(new()
{
BackupId = "<backup_crn>",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetDatabaseBackupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var databaseBackup = IbmFunctions.getDatabaseBackup(GetDatabaseBackupArgs.builder()
.backupId("<backup_crn>")
.build());
}
}
variables:
databaseBackup:
fn::invoke:
function: ibm:getDatabaseBackup
arguments:
backupId: <backup_crn>
Example coming soon!
Gen2
For Gen2 instances, the backup_id is an Independent Backup CRN with service name databases-independent-backups. This can be obtained from the backup_id field of the ibm.getDatabaseBackups data source.
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const databaseBackup = ibm.getDatabaseBackup({
backupId: "crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::",
});
import pulumi
import pulumi_ibm as ibm
database_backup = ibm.get_database_backup(backup_id="crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.GetDatabaseBackup(ctx, &ibm.GetDatabaseBackupArgs{
BackupId: "crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var databaseBackup = Ibm.GetDatabaseBackup.Invoke(new()
{
BackupId = "crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetDatabaseBackupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var databaseBackup = IbmFunctions.getDatabaseBackup(GetDatabaseBackupArgs.builder()
.backupId("crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::")
.build());
}
}
variables:
databaseBackup:
fn::invoke:
function: ibm:getDatabaseBackup
arguments:
backupId: 'crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::'
Example coming soon!
Using getDatabaseBackup
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDatabaseBackup(args: GetDatabaseBackupArgs, opts?: InvokeOptions): Promise<GetDatabaseBackupResult>
function getDatabaseBackupOutput(args: GetDatabaseBackupOutputArgs, opts?: InvokeOutputOptions): Output<GetDatabaseBackupResult>def get_database_backup(backup_id: Optional[str] = None,
id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabaseBackupResult
def get_database_backup_output(backup_id: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetDatabaseBackupResult]func GetDatabaseBackup(ctx *Context, args *GetDatabaseBackupArgs, opts ...InvokeOption) (*GetDatabaseBackupResult, error)
func GetDatabaseBackupOutput(ctx *Context, args *GetDatabaseBackupOutputArgs, opts ...InvokeOption) GetDatabaseBackupResultOutput> Note: This function is named GetDatabaseBackup in the Go SDK.
public static class GetDatabaseBackup
{
public static Task<GetDatabaseBackupResult> InvokeAsync(GetDatabaseBackupArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseBackupResult> Invoke(GetDatabaseBackupInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseBackupResult> Invoke(GetDatabaseBackupInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetDatabaseBackupResult> getDatabaseBackup(GetDatabaseBackupArgs args, InvokeOptions options)
public static Output<GetDatabaseBackupResult> getDatabaseBackup(GetDatabaseBackupArgs args, InvokeOptions options)
public static Output<GetDatabaseBackupResult> getDatabaseBackup(GetDatabaseBackupArgs args, InvokeOutputOptions options)
fn::invoke:
function: ibm:index/getDatabaseBackup:getDatabaseBackup
arguments:
# arguments dictionarydata "ibm_get_database_backup" "name" {
# arguments
}The following arguments are supported:
- Backup
Id string Backup ID.
Classic: The backup CRN returned by the ICD API, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>:backup:<backup_id>Gen2: The Independent Backup CRN, identifiable by the service name
databases-independent-backups, for example:crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::The Gen2 backup CRN can be retrieved from:
- The
backup_idfield in theibm.getDatabaseBackupsdata source (whendeployment_idis a Gen2 instance CRN). - The IBM Cloud UI under Databases → your instance → Backups.
Note: Passing a Classic (coupled) backup CRN for a Gen2 instance returns an error. Use the Independent Backup CRN instead.
- The
- Id string
- Backup
Id string Backup ID.
Classic: The backup CRN returned by the ICD API, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>:backup:<backup_id>Gen2: The Independent Backup CRN, identifiable by the service name
databases-independent-backups, for example:crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::The Gen2 backup CRN can be retrieved from:
- The
backup_idfield in theibm.getDatabaseBackupsdata source (whendeployment_idis a Gen2 instance CRN). - The IBM Cloud UI under Databases → your instance → Backups.
Note: Passing a Classic (coupled) backup CRN for a Gen2 instance returns an error. Use the Independent Backup CRN instead.
- The
- Id string
- backup_
id string Backup ID.
Classic: The backup CRN returned by the ICD API, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>:backup:<backup_id>Gen2: The Independent Backup CRN, identifiable by the service name
databases-independent-backups, for example:crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::The Gen2 backup CRN can be retrieved from:
- The
backup_idfield in theibm.getDatabaseBackupsdata source (whendeployment_idis a Gen2 instance CRN). - The IBM Cloud UI under Databases → your instance → Backups.
Note: Passing a Classic (coupled) backup CRN for a Gen2 instance returns an error. Use the Independent Backup CRN instead.
- The
- id string
- backup
Id String Backup ID.
Classic: The backup CRN returned by the ICD API, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>:backup:<backup_id>Gen2: The Independent Backup CRN, identifiable by the service name
databases-independent-backups, for example:crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::The Gen2 backup CRN can be retrieved from:
- The
backup_idfield in theibm.getDatabaseBackupsdata source (whendeployment_idis a Gen2 instance CRN). - The IBM Cloud UI under Databases → your instance → Backups.
Note: Passing a Classic (coupled) backup CRN for a Gen2 instance returns an error. Use the Independent Backup CRN instead.
- The
- id String
- backup
Id string Backup ID.
Classic: The backup CRN returned by the ICD API, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>:backup:<backup_id>Gen2: The Independent Backup CRN, identifiable by the service name
databases-independent-backups, for example:crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::The Gen2 backup CRN can be retrieved from:
- The
backup_idfield in theibm.getDatabaseBackupsdata source (whendeployment_idis a Gen2 instance CRN). - The IBM Cloud UI under Databases → your instance → Backups.
Note: Passing a Classic (coupled) backup CRN for a Gen2 instance returns an error. Use the Independent Backup CRN instead.
- The
- id string
- backup_
id str Backup ID.
Classic: The backup CRN returned by the ICD API, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>:backup:<backup_id>Gen2: The Independent Backup CRN, identifiable by the service name
databases-independent-backups, for example:crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::The Gen2 backup CRN can be retrieved from:
- The
backup_idfield in theibm.getDatabaseBackupsdata source (whendeployment_idis a Gen2 instance CRN). - The IBM Cloud UI under Databases → your instance → Backups.
Note: Passing a Classic (coupled) backup CRN for a Gen2 instance returns an error. Use the Independent Backup CRN instead.
- The
- id str
- backup
Id String Backup ID.
Classic: The backup CRN returned by the ICD API, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>:backup:<backup_id>Gen2: The Independent Backup CRN, identifiable by the service name
databases-independent-backups, for example:crn:v1:bluemix:public:databases-independent-backups:<region>:a/<account_id>:<backup_uuid>::The Gen2 backup CRN can be retrieved from:
- The
backup_idfield in theibm.getDatabaseBackupsdata source (whendeployment_idis a Gen2 instance CRN). - The IBM Cloud UI under Databases → your instance → Backups.
Note: Passing a Classic (coupled) backup CRN for a Gen2 instance returns an error. Use the Independent Backup CRN instead.
- The
- id String
getDatabaseBackup Result
The following output properties are available:
- Backup
Id string - The unique identifier of the Backup.
- Created
At string - (Optional, String) Date and time when this backup was created.
- Deployment
Id string - (Optional, String) ID of the deployment this backup relates to.
- Download
Link string - (Optional, String) URI which is currently available for file downloading.
- Id string
- Is
Downloadable bool - (Optional, Boolean) Is this backup available to download?.
- Is
Restorable bool - (Optional, Boolean) Can this backup be used to restore an instance?.
- Status string
- (Optional, String) The status of this backup.
- Constraints: Allowable values are:
running,completed,failed.
- Constraints: Allowable values are:
- Type string
- (Optional, String) The type of backup.
- Constraints: Allowable values are:
scheduled,on_demand.
- Constraints: Allowable values are:
- Backup
Id string - The unique identifier of the Backup.
- Created
At string - (Optional, String) Date and time when this backup was created.
- Deployment
Id string - (Optional, String) ID of the deployment this backup relates to.
- Download
Link string - (Optional, String) URI which is currently available for file downloading.
- Id string
- Is
Downloadable bool - (Optional, Boolean) Is this backup available to download?.
- Is
Restorable bool - (Optional, Boolean) Can this backup be used to restore an instance?.
- Status string
- (Optional, String) The status of this backup.
- Constraints: Allowable values are:
running,completed,failed.
- Constraints: Allowable values are:
- Type string
- (Optional, String) The type of backup.
- Constraints: Allowable values are:
scheduled,on_demand.
- Constraints: Allowable values are:
- backup_
id string - The unique identifier of the Backup.
- created_
at string - (Optional, String) Date and time when this backup was created.
- deployment_
id string - (Optional, String) ID of the deployment this backup relates to.
- download_
link string - (Optional, String) URI which is currently available for file downloading.
- id string
- is_
downloadable bool - (Optional, Boolean) Is this backup available to download?.
- is_
restorable bool - (Optional, Boolean) Can this backup be used to restore an instance?.
- status string
- (Optional, String) The status of this backup.
- Constraints: Allowable values are:
running,completed,failed.
- Constraints: Allowable values are:
- type string
- (Optional, String) The type of backup.
- Constraints: Allowable values are:
scheduled,on_demand.
- Constraints: Allowable values are:
- backup
Id String - The unique identifier of the Backup.
- created
At String - (Optional, String) Date and time when this backup was created.
- deployment
Id String - (Optional, String) ID of the deployment this backup relates to.
- download
Link String - (Optional, String) URI which is currently available for file downloading.
- id String
- is
Downloadable Boolean - (Optional, Boolean) Is this backup available to download?.
- is
Restorable Boolean - (Optional, Boolean) Can this backup be used to restore an instance?.
- status String
- (Optional, String) The status of this backup.
- Constraints: Allowable values are:
running,completed,failed.
- Constraints: Allowable values are:
- type String
- (Optional, String) The type of backup.
- Constraints: Allowable values are:
scheduled,on_demand.
- Constraints: Allowable values are:
- backup
Id string - The unique identifier of the Backup.
- created
At string - (Optional, String) Date and time when this backup was created.
- deployment
Id string - (Optional, String) ID of the deployment this backup relates to.
- download
Link string - (Optional, String) URI which is currently available for file downloading.
- id string
- is
Downloadable boolean - (Optional, Boolean) Is this backup available to download?.
- is
Restorable boolean - (Optional, Boolean) Can this backup be used to restore an instance?.
- status string
- (Optional, String) The status of this backup.
- Constraints: Allowable values are:
running,completed,failed.
- Constraints: Allowable values are:
- type string
- (Optional, String) The type of backup.
- Constraints: Allowable values are:
scheduled,on_demand.
- Constraints: Allowable values are:
- backup_
id str - The unique identifier of the Backup.
- created_
at str - (Optional, String) Date and time when this backup was created.
- deployment_
id str - (Optional, String) ID of the deployment this backup relates to.
- download_
link str - (Optional, String) URI which is currently available for file downloading.
- id str
- is_
downloadable bool - (Optional, Boolean) Is this backup available to download?.
- is_
restorable bool - (Optional, Boolean) Can this backup be used to restore an instance?.
- status str
- (Optional, String) The status of this backup.
- Constraints: Allowable values are:
running,completed,failed.
- Constraints: Allowable values are:
- type str
- (Optional, String) The type of backup.
- Constraints: Allowable values are:
scheduled,on_demand.
- Constraints: Allowable values are:
- backup
Id String - The unique identifier of the Backup.
- created
At String - (Optional, String) Date and time when this backup was created.
- deployment
Id String - (Optional, String) ID of the deployment this backup relates to.
- download
Link String - (Optional, String) URI which is currently available for file downloading.
- id String
- is
Downloadable Boolean - (Optional, Boolean) Is this backup available to download?.
- is
Restorable Boolean - (Optional, Boolean) Can this backup be used to restore an instance?.
- status String
- (Optional, String) The status of this backup.
- Constraints: Allowable values are:
running,completed,failed.
- Constraints: Allowable values are:
- type String
- (Optional, String) The type of backup.
- Constraints: Allowable values are:
scheduled,on_demand.
- Constraints: Allowable values are:
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibmTerraform Provider.
published on Friday, Oct 30, 2026 by ibm-cloud