steampipe plugin install aws

Table: aws_backup_jobs - Query AWS Backup Jobs using SQL

The AWS Backup Jobs are a part of the AWS Backup service, which provides users with a fully managed solution for data protection. These jobs are used to copy data from various sources to AWS Backup Vaults. A backup job can be created manually or automated using a Backup Plan, which specifies the source data set, the target Backup Vault, the backup frequency, and the retention period.

Table Usage Guide

The aws_backup_job table in Steampipe provides detailed information about backup jobs within AWS Backup. This table allows you to query specific details of each job, such as its state, target vault name, ARN, recovery points, and associated metadata. By utilizing this table, you can gain insights into backup jobs, including the number of successful or failed jobs, the creation date of each job, and more. The schema outlines various attributes of the backup job, including the target vault name, ARN, creation date, job state, and associated tags.

Examples

Basic Info

Track the status of your AWS backup jobs, including their job ID, recovery points, and the backup vaults they were created in. This feature is especially valuable for disaster recovery purposes, as it allows you to monitor the progress and status of your backup jobs. By keeping tabs on your backup jobs, you can ensure the safety and availability of your important data.

select
job_id,
recovery_point_arn,
backup_vault_arn,
status
from
aws_backup_job
select
job_id,
recovery_point_arn,
backup_vault_arn,
status
from
aws_backup_job;

List failed backup jobs

Identify backup jobs that have failed to create a recovery point. This information can be valuable in identifying backup processes that may need maintenance or review.

select
job_id,
recovery_point_arn,
backup_vault_arn,
status,
current_date
from
aws_backup_job
where
status != 'COMPLETED'
and creation_date > current_date
select
job_id,
recovery_point_arn,
backup_vault_arn,
status
from
aws_backup_job
where
status != 'COMPLETED'
and creation_date > current_date;

List backup jobs by resource type

Monitor the number of your AWS backup jobs by resource type.

select
resource_type,
count(*)
from
aws_backup_job
group by
resource_type
select
resource_type,
count(*)
from
aws_backup_job
group by
resource_type;

Schema for aws_backup_job

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
backup_optionsjsonbSpecifies the backup options for a selected resource.
backup_sizebigintThe size in bytes of a backup.
backup_typetextRepresents the type of backup for a backup job.
backup_vault_arntextAn Amazon Resource Name (ARN) that uniquely identifies the target backup vault.
backup_vault_nametextThe name of the target backup vault.
bytes_transferredbigintThe size in bytes transferred to a backup vault at the time that the job status was queried.
completion_datetimestamp with time zoneThe date and time a backup job is completed.
creation_datetimestamp with time zoneThe date and time a backup job is created.
expected_completion_datetimestamp with time zoneThe date and time a backup job is expected to be completed.
iam_role_arntextThe ARN of the IAM role that AWS Backup uses to create the target recovery point.
is_parentbooleanA Boolean value that is returned as TRUE if the specified job is a parent job.
job_idtext=The logical id of a backup job.
parent_job_idtextThe ID of the parent backup job, if there is one.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
percent_donetextThe percentage of job completion.
recovery_point_arntextAn Amazon Resource Name (ARN) that uniquely identifies a recovery point.
regiontextThe AWS Region in which the resource is located.
resource_arntextAn Amazon Resource Name (ARN) that uniquely identifies the source resource in the recovery point.
resource_typetextThe type of AWS resource to be backed up.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
start_bytimestamp with time zoneThe date and time a backup job must be started before it is canceled.
statustextThe current state of a backup job.
status_messagetextA detailed message explaining the status of the job.
titletextTitle of the resource.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws

You can pass the configuration to the command with the --config argument:

steampipe_export_aws --config '<your_config>' aws_backup_job