gb backups
List and manage Genbox backups.
Synopsis
gb backups [options]
gb backups list [options]
gb backups restore <id> [options]
gb backups delete <id> [options]Description
Manage backup snapshots of your Genbox environments. List, restore, or delete existing backups.
Subcommands
list
List all available backups:
gb backups listOptions:
--env <name>- Filter by environment--json- Output as JSON
restore
Restore a backup to a new environment:
gb backups restore <backup-id> [options]Options:
--name <name>- Name for restored environment--db-only- Only restore database--code-only- Only restore code
delete
Delete a backup:
gb backups delete <backup-id>Examples
List All Backups
gb backupsOutput:
Your Backups:
ID ENV LABEL SIZE AGE
bkp_abc123 feature-auth Before refactor 201 MB 2d ago
bkp_def456 feature-auth (auto: pre-destroy) 198 MB 5d ago
bkp_ghi789 bugfix-login Working state 156 MB 1w ago
3 backups (555 MB total)Filter by Environment
gb backups list --env feature-authRestore Backup
# Restore to new environment
gb backups restore bkp_abc123 --name feature-auth-restored
# Restore only database to existing env
gb backups restore bkp_abc123 --db-only --name feature-authDelete Backup
gb backups delete bkp_def456Backup Details
View detailed backup information:
gb backups info bkp_abc123Output:
Backup: bkp_abc123
Environment: feature-auth
Created: 2024-12-22 14:30:00
Label: Before refactor
Size: 201 MB
Expires: 2025-01-21
Contents:
Code: 156 MB (admin, api, web)
Database: 45 MB (12 collections)
Config: 2 KB
Restore with: gb backups restore bkp_abc123Notes
- Backups count against storage quota
- Expired backups are automatically deleted
- Use labels to extend retention
- Restore creates new environment (doesn’t overwrite)
See Also
gb backup- Create new backupgb db sync- Sync from sourcegb create- Create environment
Last updated on