LinuxCommandLibrary

aws-backup

Manage and automate data backups

TLDR

Return BackupPlan details for a specific BackupPlanId

$ aws backup get-backup-plan --backup-plan-id [id]
copy

Create a backup plan using a specific backup plan name and backup rules
$ aws backup create-backup-plan --backup-plan [plan]
copy

Delete a specific backup plan
$ aws backup delete-backup-plan --backup-plan-id [id]
copy

List all active backup plans for the current account
$ aws backup list-backup-plans
copy

Display details about your report jobs
$ aws backup list-report-jobs
copy

SYNOPSIS

aws backup <subcommand> [<options>]

PARAMETERS

Common AWS CLI Global Options:
    These options apply globally to all AWS CLI commands, including aws backup.

--region <value>
    Specifies the AWS region to send the request to (e.g., us-east-1).

--output <value>
    Determines the output format (e.g., json, text, table).

--profile <value>
    Uses a specific named profile from your credentials file.

--endpoint-url <value>
    Specifies a custom endpoint for the service.

--debug
    Turns on debug logging for detailed request/response information.

AWS Backup Subcommand-Specific Parameters:
    The aws backup command operates via specific subcommands, each with its own set of parameters. These parameters define the resource, configuration, or filters for the operation.
For a comprehensive list of subcommands and their parameters, refer to the official AWS CLI documentation for the Backup service.

<subcommand>
    A required argument specifying the AWS Backup operation (e.g., create-backup-plan, list-backup-jobs, start-restore-job, get-backup-vault).

--backup-plan-name <value>
    Used with subcommands like create-backup-plan to specify the name of the backup plan.

--backup-vault-name <value>
    Specifies the name of the backup vault for operations like create-backup-vault or when interacting with recovery points.

--recovery-point-arn <value>
    Required for restore operations to identify the specific recovery point to restore from.

--max-results <integer>
    Commonly used for pagination in list operations to limit the number of items returned per call.

--next-token <value>
    Used in conjunction with --max-results for paginating through large result sets in list operations.

DESCRIPTION

The `aws-backup` command does not exist as a standalone Linux utility. Instead, the AWS Backup service is managed and interacted with programmatically through the AWS Command Line Interface (CLI), using the `aws backup` subcommand.

AWS Backup is a fully managed, centralized backup service provided by Amazon Web Services. It simplifies the process of backing up application data across various AWS services (like Amazon EC2, EBS, RDS, DynamoDB, EFS, FSx, and Storage Gateway) and on-premises resources.

The `aws backup` command provides a powerful interface for automating data protection tasks. Users can define and manage backup plans, create backup vaults, initiate on-demand backups, perform data restorations, and monitor backup and restore jobs. It enables organizations to establish consistent backup policies, enforce data retention requirements, and meet compliance objectives without needing to develop custom solutions for each service. This centralized approach significantly reduces operational overhead and enhances data resilience.

CAVEATS

  • Requires the AWS CLI to be installed and configured with appropriate credentials and region.
  • Operations are subject to IAM permissions; the AWS identity (user or role) executing the command must have sufficient permissions for the requested AWS Backup actions.
  • Understanding AWS Backup concepts (backup plans, rules, vaults, recovery points, jobs) is crucial for effective use.
  • Network connectivity to AWS API endpoints is required.
  • Errors can sometimes be non-descriptive; using the --debug option can provide more insights.

INSTALLATION AND CONFIGURATION

To use aws backup, you first need to install the AWS CLI. It can be installed using `pip` (Python package manager) or platform-specific installers. After installation, configure your AWS credentials and default region using `aws configure` to authenticate your commands against your AWS account.

COMMON USE CASES

The aws backup command is widely used for:

  • Automating daily/weekly/monthly backups of critical AWS resources.
  • Implementing disaster recovery strategies by restoring data to new instances or regions.
  • Enforcing data retention policies to meet compliance requirements.
  • Scripting backup and restore operations as part of CI/CD pipelines or operational runbooks.
  • Monitoring the status and history of all backup and restore jobs centrally.

HISTORY

The AWS Backup service was launched by Amazon Web Services in January 2019, aiming to provide a centralized and automated backup solution for various AWS services. Concurrently, the aws backup subcommand was integrated into the AWS Command Line Interface (CLI) to allow programmatic access to the new service's APIs. Since its inception, AWS Backup and its CLI interface have continuously evolved, adding support for more AWS services, new backup and restore capabilities, and enhanced features like cross-region and cross-account backup. Its development has focused on simplifying and standardizing data protection strategies across the AWS ecosystem.

SEE ALSO

aws(1), aws s3(1), aws ec2(1), aws rds(1), cron(8), tar(1)

Copied to clipboard