AWS Backup - 8 Use Cases (with examples)
1. Get BackupPlan details for a specific BackupPlanId
Code:
aws backup get-backup-plan --backup-plan-id id
Motivation:
By using this command, you can retrieve specific details of a BackupPlan by providing its unique BackupPlanId. This is useful when you need to view or validate the configuration settings of a specific backup plan.
Arguments:
--backup-plan-id
(string): The unique identifier of the BackupPlan. This argument specifies the BackupPlanId for which you want to retrieve the details.
Example Output:
{
"BackupPlan": {
"BackupPlanId": "31874859-449e-40db-ad63-7167c38b4dce",
"BackupPlanArn": "arn:aws:backup:us-west-2:123456789012:backup-plan:31874859-449e-40db-ad63-7167c38b4dce",
"BackupPlanName": "MyBackupPlan",
"VersionId": "1",
...
}
}
2. Create a backup plan using a specific backup plan name and backup rules
Code:
aws backup create-backup-plan --backup-plan plan
Motivation:
This command allows you to create a new backup plan using a specific backup plan name and desired backup rules. It’s ideal for automating the creation of backups and simplifying the backup configuration process.
Arguments:
--backup-plan
(string): The JSON representation of the backup plan. This argument specifies the backup plan name and backup rules in a structured format.
Example Output:
{
"BackupPlanId": "1a2b3c4d",
"BackupPlanArn": "arn:aws:backup:us-west-2:123456789012:backup-plan:1a2b3c4d",
...
}
3. Delete a specific backup plan
Code:
aws backup delete-backup-plan --backup-plan-id id
Motivation:
With this command, you can delete a specific backup plan by providing its unique BackupPlanId. This is helpful when you no longer need a backup plan and want to clean up your backup configurations.
Arguments:
--backup-plan-id
(string): The unique identifier of the BackupPlan. This argument specifies the BackupPlanId of the backup plan to be deleted.
Example Output:
None (successful execution doesn’t return any output).
4. Return a list of all active backup plans for the current account
Code:
aws backup list-backup-plans
Motivation:
This command provides a list of all the active backup plans associated with the current AWS account. It allows you to quickly view and manage your existing backup plans.
Arguments:
None
Example Output:
{
"BackupPlans": [
{
"BackupPlanId": "1a2b3c4d",
"BackupPlanArn": "arn:aws:backup:us-west-2:123456789012:backup-plan:1a2b3c4d",
"BackupPlanName": "MyBackupPlan",
"VersionId": "1",
...
},
...
]
}
5. Display details about your report jobs
Code:
aws backup list-report-jobs
Motivation:
This command provides information about the report jobs associated with your AWS Backup service. Report jobs give you detailed insights into your backups, allowing you to monitor the status and progress of backup and restore operations.
Arguments:
None
Example Output:
{
"ReportJobs": [
{
"ReportJobId": "1a2b3c4d",
"ReportJobState": "COMPLETED",
"ReportPlanArn": "arn:aws:backup:us-west-2:123456789012:backup-plan:1a2b3c4d",
...
},
...
]
}