List & Query

It is possible to list database instances or clusters using the bconsole .ls command or through a .query command.

Any Fileset parameter can be employed in the plugin="" value to filter the results,

similar to how the backup operates.

Below, there are several examples:

List instances:

Query example: List all instances
.query plugin="amazon-rds: region=us-east-1 access_key=AKIAQTESTKEY12134g secret_key=m23480ahpqwre894qwrffsfdSecretExample" client=127.0.0.1-fd parameter="instance"
instance=jg-pg-aws
instanceId=jg-pg-aws
jg-pg-aws.dbName=bacula
jg-pg-aws.status=starting
jg-pg-aws.createTime=2024-03-28 10:27:41
jg-pg-aws.latestRestorableTime=2024-06-04 11:14:35

Note

The previous query command can be used to retrieve the latestRestorableTime, which is useful for any Point-In-Time recovery operation.

List snapshots of a given instance:

Query example: Get all snapshots of a given instance
*.query client=127.0.0.1-fd plugin="amazon-rds: region=us-east-1 access_key=AKIAQTESTKEY12134g secret_key=m23480ahpqwre894qwrffsfdSecretExample instances=jg-pg-aws" parameter=snapshot
snapshot=plugintest-20240527-114110-03
snapshotId=plugintest-20240527-114110-03
plugintest-20240527-114110-03.instanceId=jg-pg-aws
plugintest-20240527-114110-03.status=available
plugintest-20240527-114110-03.createTime=2024-05-27 09:41:25
snapshot=plugintest-20240527-124713-03
snapshotId=plugintest-20240527-124713-03
plugintest-20240527-124713-03.instanceId=jg-pg-aws
plugintest-20240527-124713-03.status=available
plugintest-20240527-124713-03.createTime=2024-05-27 10:48:05
snapshot=rds:jg-pg-aws-2024-05-16-12-30
snapshotId=rds:jg-pg-aws-2024-05-16-12-30
rds:jg-pg-aws-2024-05-16-12-30.instanceId=jg-pg-aws
rds:jg-pg-aws-2024-05-16-12-30.status=available
rds:jg-pg-aws-2024-05-16-12-30.createTime=2024-05-16 12:30:54
snapshot=rds:jg-pg-aws-2024-05-17-12-30
snapshotId=rds:jg-pg-aws-2024-05-17-12-30
rds:jg-pg-aws-2024-05-17-12-30.instanceId=jg-pg-aws
rds:jg-pg-aws-2024-05-17-12-30.status=available
rds:jg-pg-aws-2024-05-17-12-30.createTime=2024-05-17 12:31:00
snapshot=rds:jg-pg-aws-2024-05-24-16-02
snapshotId=rds:jg-pg-aws-2024-05-24-16-02
rds:jg-pg-aws-2024-05-24-16-02.instanceId=jg-pg-aws
rds:jg-pg-aws-2024-05-24-16-02.status=available
rds:jg-pg-aws-2024-05-24-16-02.createTime=2024-05-24 16:02:49
snapshot=rds:jg-pg-aws-2024-05-25-12-30
snapshotId=rds:jg-pg-aws-2024-05-25-12-30
rds:jg-pg-aws-2024-05-25-12-30.instanceId=jg-pg-aws
rds:jg-pg-aws-2024-05-25-12-30.status=available
rds:jg-pg-aws-2024-05-25-12-30.createTime=2024-05-25 12:30:44
snapshot=rds:jg-pg-aws-2024-05-26-12-30
snapshotId=rds:jg-pg-aws-2024-05-26-12-30
rds:jg-pg-aws-2024-05-26-12-30.instanceId=jg-pg-aws
rds:jg-pg-aws-2024-05-26-12-30.status=available
rds:jg-pg-aws-2024-05-26-12-30.createTime=2024-05-26 12:30:38
snapshot=rds:jg-pg-aws-2024-05-27-09-41
snapshotId=rds:jg-pg-aws-2024-05-27-09-41
rds:jg-pg-aws-2024-05-27-09-41.instanceId=jg-pg-aws
rds:jg-pg-aws-2024-05-27-09-41.status=available
rds:jg-pg-aws-2024-05-27-09-41.createTime=2024-05-27 09:41:25
snapshot=rds:jg-pg-aws-2024-05-27-10-47
snapshotId=rds:jg-pg-aws-2024-05-27-10-47
rds:jg-pg-aws-2024-05-27-10-47.instanceId=jg-pg-aws
rds:jg-pg-aws-2024-05-27-10-47.status=available
rds:jg-pg-aws-2024-05-27-10-47.createTime=2024-05-27 10:48:05
snapshot=rds:jg-pg-aws-2024-06-03-11-41
snapshotId=rds:jg-pg-aws-2024-06-03-11-41
rds:jg-pg-aws-2024-06-03-11-41.instanceId=jg-pg-aws
rds:jg-pg-aws-2024-06-03-11-41.status=available
rds:jg-pg-aws-2024-06-03-11-41.createTime=2024-06-03 11:41:04

Note

The previous query command can be used to retrieve the snapshot ids currently available in the cloud. They can be used to restore the instance to that particular state by using the from_snapshot_id restore parameter.

See also

Previous articles:

Go back to: Operations.