This document provides detailed information about configuring storage backends for backup and restore operations.
The backup and restore tools support multiple storage backends for saving and retrieving workspace backups. Currently supported storage types are:
- AWS S3 - Store backups in Amazon S3 buckets
- Local - Store backups in the local filesystem
The storage configuration is defined in a YAML configuration file that you pass to the backup or restore tool.
The basic structure of a storage configuration file is:
storage_type: <storage_type>
storage:
# Storage-specific configuration optionsAdditional optional parameters may be available depending on the tool (e.g., api_page_size, batch_size for backup operations).
storage_type: s3
storage:
bucket: your-backup-bucket
backup_path: path/to/backups/storage_type: s3
storage:
bucket: your-backup-bucket
backup_path: path/to/backups/
profile: services
aws_access_key_id: your-access-key-id
aws_secret_access_key: your-secret-access-key
aws_default_region: us-east-1| Field | Required | Description |
|---|---|---|
bucket |
Yes | S3 bucket name containing the backups |
backup_path |
Yes | Absolute path within the S3 bucket to the root directory of backups |
profile |
No | AWS profile name to use (from ~/.aws/credentials) |
aws_access_key_id |
No | AWS access key ID for authentication |
aws_secret_access_key |
No | AWS secret access key for authentication |
aws_default_region |
No | AWS region where the bucket is located |
The tools follow the standard boto3 credential resolution process. You can provide credentials through:
- Configuration file (as shown above)
- Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY) - AWS credentials file (
~/.aws/credentials) - IAM roles (when running on AWS infrastructure)
For detailed AWS authentication setup, see the main README AWS section.
Configuration file (s3_config.yaml):
storage_type: s3
storage:
bucket: my-gooddata-backups
backup_path: production/backups/
profile: production-awsUsage:
python scripts/backup.py workspaces.csv s3_config.yamlstorage_type: local
storage:- Backup operations: Backups are saved to
./local_backups/directory relative to where the script is executed - Restore operations: Backups are read from
./local_backups/directory relative to where the script is executed
Note: For backup operations, the number of existing backups in the ./local_backups/ folder may affect script performance.
Configuration file (local_config.yaml):
storage_type: local
storage:Usage:
python scripts/backup.py workspaces.csv local_config.yamlThis will create backups in ./local_backups/ in your current working directory.
When using the backup tool, additional configuration options are available:
Controls the batch size when fetching workspace IDs from the GoodData API (used with list-of-parents or entire-organization input types).
Default: 100
storage_type: s3
storage:
bucket: my-bucket
backup_path: backups/
api_page_size: 200Determines how many workspaces are processed before saving the backups to storage.
Default: 100
storage_type: s3
storage:
bucket: my-bucket
backup_path: backups/
batch_size: 50storage_type: s3
storage:
bucket: gooddata-prod-backups
backup_path: org_123/backups/
profile: production
aws_default_region: eu-west-1
api_page_size: 150
batch_size: 25Example configuration files can be found in:
- examples/backup_and_restore/configuration_s3.yaml
- examples/backup_and_restore/configuration_local.yaml
If you encounter permission errors when accessing S3:
- Verify your AWS credentials are correctly configured
- Ensure the IAM user/role has appropriate S3 permissions:
s3:GetObject(for restore)s3:PutObject(for backup)s3:ListBucket(for both)
- Check that the bucket name and region are correct
- Verify the
backup_pathexists and is accessible
If backups fail with local storage:
- Ensure you have write permissions in the current directory
- Check available disk space
- Verify the
./local_backups/directory can be created
For additional help, check the tool-specific documentation: