published on Thursday, Nov 5, 2026 by ibm-cloud
published on Thursday, Nov 5, 2026 by ibm-cloud
Provides a read-only data source for Backups. 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 databaseBackups = ibm.getDatabaseBackups({
deploymentId: "<crn>",
});
import pulumi
import pulumi_ibm as ibm
database_backups = ibm.get_database_backups(deployment_id="<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.GetDatabaseBackups(ctx, &ibm.GetDatabaseBackupsArgs{
DeploymentId: pulumi.StringRef("<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 databaseBackups = Ibm.GetDatabaseBackups.Invoke(new()
{
DeploymentId = "<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.GetDatabaseBackupsArgs;
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 databaseBackups = IbmFunctions.getDatabaseBackups(GetDatabaseBackupsArgs.builder()
.deploymentId("<crn>")
.build());
}
}
variables:
databaseBackups:
fn::invoke:
function: ibm:getDatabaseBackups
arguments:
deploymentId: <crn>
Example coming soon!
Gen2
For Gen2 instances, the deployment_id is a Gen2 database instance CRN. The data source lists all Independent Backups associated with that instance.
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const databaseBackups = ibm.getDatabaseBackups({
deploymentId: "crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::",
});
import pulumi
import pulumi_ibm as ibm
database_backups = ibm.get_database_backups(deployment_id="crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::")
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.GetDatabaseBackups(ctx, &ibm.GetDatabaseBackupsArgs{
DeploymentId: pulumi.StringRef("crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::"),
}, 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 databaseBackups = Ibm.GetDatabaseBackups.Invoke(new()
{
DeploymentId = "crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::",
});
});
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.GetDatabaseBackupsArgs;
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 databaseBackups = IbmFunctions.getDatabaseBackups(GetDatabaseBackupsArgs.builder()
.deploymentId("crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::")
.build());
}
}
variables:
databaseBackups:
fn::invoke:
function: ibm:getDatabaseBackups
arguments:
deploymentId: 'crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::'
Example coming soon!
Using getDatabaseBackups
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 getDatabaseBackups(args: GetDatabaseBackupsArgs, opts?: InvokeOptions): Promise<GetDatabaseBackupsResult>
function getDatabaseBackupsOutput(args: GetDatabaseBackupsOutputArgs, opts?: InvokeOutputOptions): Output<GetDatabaseBackupsResult>def get_database_backups(deployment_id: Optional[str] = None,
id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabaseBackupsResult
def get_database_backups_output(deployment_id: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetDatabaseBackupsResult]func GetDatabaseBackups(ctx *Context, args *GetDatabaseBackupsArgs, opts ...InvokeOption) (*GetDatabaseBackupsResult, error)
func GetDatabaseBackupsOutput(ctx *Context, args *GetDatabaseBackupsOutputArgs, opts ...InvokeOption) GetDatabaseBackupsResultOutput> Note: This function is named GetDatabaseBackups in the Go SDK.
public static class GetDatabaseBackups
{
public static Task<GetDatabaseBackupsResult> InvokeAsync(GetDatabaseBackupsArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseBackupsResult> Invoke(GetDatabaseBackupsInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseBackupsResult> Invoke(GetDatabaseBackupsInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetDatabaseBackupsResult> getDatabaseBackups(GetDatabaseBackupsArgs args, InvokeOptions options)
public static Output<GetDatabaseBackupsResult> getDatabaseBackups(GetDatabaseBackupsArgs args, InvokeOptions options)
public static Output<GetDatabaseBackupsResult> getDatabaseBackups(GetDatabaseBackupsArgs args, InvokeOutputOptions options)
fn::invoke:
function: ibm:index/getDatabaseBackups:getDatabaseBackups
arguments:
# arguments dictionarydata "ibm_get_database_backups" "name" {
# arguments
}The following arguments are supported:
- Deployment
Id string ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- Id string
- Deployment
Id string ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- Id string
- deployment_
id string ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- id string
- deployment
Id String ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- id String
- deployment
Id string ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- id string
- deployment_
id str ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- id str
- deployment
Id String ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- id String
getDatabaseBackups Result
The following output properties are available:
- Backups
List<Get
Database Backups Backup> - (Optional, List) An array of backups. Nested scheme for backups:
- Id string
- Deployment
Id string - (Optional, String) ID of the deployment this backup relates to.
- Backups
[]Get
Database Backups Backup - (Optional, List) An array of backups. Nested scheme for backups:
- Id string
- Deployment
Id string - (Optional, String) ID of the deployment this backup relates to.
- backups list(object)
- (Optional, List) An array of backups. Nested scheme for backups:
- id string
- deployment_
id string - (Optional, String) ID of the deployment this backup relates to.
- backups
List<Get
Database Backups Backup> - (Optional, List) An array of backups. Nested scheme for backups:
- id String
- deployment
Id String - (Optional, String) ID of the deployment this backup relates to.
- backups
Get
Database Backups Backup[] - (Optional, List) An array of backups. Nested scheme for backups:
- id string
- deployment
Id string - (Optional, String) ID of the deployment this backup relates to.
- backups
Sequence[Get
Database Backups Backup] - (Optional, List) An array of backups. Nested scheme for backups:
- id str
- deployment_
id str - (Optional, String) ID of the deployment this backup relates to.
- backups List<Property Map>
- (Optional, List) An array of backups. Nested scheme for backups:
- id String
- deployment
Id String - (Optional, String) ID of the deployment this backup relates to.
Supporting Types
GetDatabaseBackupsBackup
- Backup
Id string - (Optional, String) ID of this backup.
- Created
At string - (Optional, String) Date and time when this backup was created.
- Deployment
Id string ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- Download
Link string - (Optional, String) URI which is currently available for file downloading.
- 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 - (Optional, String) ID of this backup.
- Created
At string - (Optional, String) Date and time when this backup was created.
- Deployment
Id string ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- Download
Link string - (Optional, String) URI which is currently available for file downloading.
- 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 - (Optional, String) ID of this backup.
- created_
at string - (Optional, String) Date and time when this backup was created.
- deployment_
id string ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- download_
link string - (Optional, String) URI which is currently available for file downloading.
- 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 - (Optional, String) ID of this backup.
- created
At String - (Optional, String) Date and time when this backup was created.
- deployment
Id String ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- download
Link String - (Optional, String) URI which is currently available for file downloading.
- 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 - (Optional, String) ID of this backup.
- created
At string - (Optional, String) Date and time when this backup was created.
- deployment
Id string ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- download
Link string - (Optional, String) URI which is currently available for file downloading.
- 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 - (Optional, String) ID of this backup.
- created_
at str - (Optional, String) Date and time when this backup was created.
- deployment_
id str ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- download_
link str - (Optional, String) URI which is currently available for file downloading.
- 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 - (Optional, String) ID of this backup.
- created
At String - (Optional, String) Date and time when this backup was created.
- deployment
Id String ID of the deployment this backup relates to.
Classic: The database instance CRN, for example:
crn:v1:bluemix:public:databases-for-postgresql:us-south:a/<account_id>:<instance_id>::Gen2: The Gen2 database instance CRN, for example:
crn:v1:bluemix:public:databases-for-mysql:<region>:a/<account_id>:<instance_id>::The Gen2 deployment CRN can be retrieved from:
- The
idattribute of anibm.Databaseresource configured with a Gen2 plan. - The IBM Cloud UI under Databases → your instance → Overview.
- The
- download
Link String - (Optional, String) URI which is currently available for file downloading.
- 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 Thursday, Nov 5, 2026 by ibm-cloud