Back up data to cloud storage with absctl backup
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
Use absctl backup to write backups directly to the following cloud storage providers:
To back up to cloud storage, specify the relevant flags for your provider.
Amazon S3
To back up to Amazon S3, use the following flags:
--s3-bucket-name: The name of the S3 bucket.--s3-region: The AWS region when using the default AWS endpoint. You can also provide it via your AWS profile or environment.
Prerequisites
- An S3 bucket must exist before running the backup.
- Authentication via one of: AWS profile (
--s3-profile), static credentials (--s3-access-key-idand--s3-secret-access-key), or environment variables (AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY).
Required permissions
The IAM identity used for backup requires the following S3 permissions. Replace BACKUP_BUCKET with your bucket name.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketLocation" ], "Resource": "arn:aws:s3:::BACKUP_BUCKET" }, { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::BACKUP_BUCKET/*" } ]}Example
absctl backup -n NAMESPACE_NAME -d BACKUP_DIRECTORY --s3-bucket-name BUCKET_NAME --s3-region REGION_NAMEGoogle Cloud Storage (GCS)
To back up to Google Cloud Storage, use the following flags:
--gcp-bucket-name: The name of the GCS bucket.--gcp-key-path: Optional path to a service account key file in JSON format.
Prerequisites
- A GCS bucket must exist before running the backup.
- Google Cloud credentials from one of the following sources:
- A service account attached to the Google Compute Engine virtual machine, Google Kubernetes Engine workload, or other supported Google Cloud runtime
- Application Default Credentials configured through
GOOGLE_APPLICATION_CREDENTIALSor another supported credential source - A service account JSON key file specified with
--gcp-key-path
absctl 1.1.0 uses Application Default Credentials when --gcp-key-path is unset. absctl 1.0.0 does not load Application Default Credentials when the key path is unset, so specify a service account JSON key file for authenticated access.
Required permissions
The service account requires the following IAM role or equivalent permissions:
- Role:
roles/storage.objectAdminon the bucket, or custom permissions:storage.objects.createstorage.objects.deletestorage.objects.list
Example
absctl backup -n NAMESPACE_NAME -d BACKUP_DIRECTORY --gcp-bucket-name BUCKET_NAME --gcp-key-path /path/to/key.jsonAzure Blob Storage
To back up to Azure Blob Storage, use the following required flags:
--azure-container-name: The name of the Azure container.--azure-endpoint: Azure Blob service endpoint URL (required).
Prerequisites
- A storage account and container must exist before running the backup.
- Authentication via one of the following methods.
Authentication methods
- Shared key:
--azure-account-nameand--azure-account-key - Azure AD (service principal):
--azure-tenant-id,--azure-client-id, and--azure-client-secret - SAS token: Include the SAS token in the
--azure-endpointURL
Required permissions
The identity or SAS token requires the following permissions on the container:
-
Azure RBAC role:
Storage Blob Data Contributor, or custom permissions:Microsoft.Storage/storageAccounts/blobServices/containers/blobs/writeMicrosoft.Storage/storageAccounts/blobServices/containers/blobs/deleteMicrosoft.Storage/storageAccounts/blobServices/containers/blobs/read(for listing)
-
SAS token permissions: Write (
w), Delete (d), List (l)
Example
absctl backup -n NAMESPACE_NAME -d BACKUP_DIRECTORY --azure-container-name CONTAINER_NAME --azure-endpoint https://ACCOUNT_NAME.blob.core.windows.net/ --azure-account-name ACCOUNT_NAME --azure-account-key KEY_NAMECloud storage options reference
The following options are available for cloud storage backups, grouped by provider. For required permissions, see the previous provider-specific sections.
In absctl 1.1.0, the default S3 and GCS chunk sizes and Azure block size are 50 MiB. In absctl 1.0.0, these defaults are 5 MiB.
For cloud backups in absctl 1.1.0, the number of upload parts for each backup file must remain below 10,000. The approximate part count is ceil(--file-limit / chunk-or-block-size). Increase the chunk or block size, or reduce --file-limit, if the result is 10,000 or greater. absctl 1.0.0 does not validate this relationship before starting a backup.
Storage classes and access tiers
Cloud providers offer different storage classes and access tiers that trade off cost against retrieval speed.
Use --s3-storage-class for Amazon S3 or --azure-access-tier for Azure Blob Storage to control how backup files are stored.
Amazon S3 storage classes
Default: If not specified, the bucket’s default storage class is used (typically STANDARD).
Example:
absctl backup -n NAMESPACE -d backup_dir --s3-bucket-name BUCKET --s3-region REGION --s3-storage-class GLACIER_IRAzure Blob Storage access tiers
Default: If not specified, the container’s default access tier is used.
Example:
absctl backup -n NAMESPACE -d backup_dir --azure-container-name CONTAINER --azure-endpoint https://ACCOUNT.blob.core.windows.net/ --azure-account-name ACCOUNT --azure-account-key KEY --azure-access-tier Cool