Skip to Content
New to Genbox? Check out our Getting Started guide
Commandsbackups

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 list

Options:

  • --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 backups

Output:

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-auth

Restore 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-auth

Delete Backup

gb backups delete bkp_def456

Backup Details

View detailed backup information:

gb backups info bkp_abc123

Output:

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_abc123

Notes

  • Backups count against storage quota
  • Expired backups are automatically deleted
  • Use labels to extend retention
  • Restore creates new environment (doesn’t overwrite)

See Also

Last updated on