Skip to content

[Enhancement] fix Misleading Backup Description and Retention Policy for gbctl #1311

@opbot-xd

Description

@opbot-xd

Description

The gbctl backup command introduces two critical gaps for long-term deployments:

  1. No Actual Volume Backup: Despite the help menu stating "Backup database and volumes", cmd_backup only dumps PostgreSQL. Docker volumes (mlmodels, static_content, logs) are ignored; only their names are exported to a text file.
  2. Missing Backup Retention: Running ./gbctl backup via cron creates a new .sql.gz dump every time, potentially filling up the host's disk space over time. There is currently no built-in cleanup or retention policy to prune old backups.

Proposed Solution

  1. Either we can simply update print_help() function or should we implement backup of volumes (which I dont think we need).
  2. Add Retention Flag: Introduce a --keep-days <N> flag to automatically prune old backups (e.g., find backups/ -type f -mtime +N -delete).

Metadata

Metadata

Assignees

Labels

dockerPull requests that update Docker codeenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions