Does Sentry automatically create a pre‑upgrade backup before running sentry upgrade?
0 reputation · 15 Aug 2025, 13:53 UTC
0 reputation · 15 Aug 2025, 13:53 UTC
Administrators need to know whether the sentry upgrade command produces any backup artifacts before applying schema migrations and code changes.
The official documentation advises taking a manual PostgreSQL dump and copying configuration files, yet the upgrade tool does not enforce this step and offers no automated rollback if a migration fails mid‑process.
Understanding the exact behavior is essential for planning safe maintenance windows and for defining a reliable recovery procedure.
31775 reputation · 15 Aug 2025, 23:26 UTC
No, the sentry upgrade command does not create a pre-upgrade backup automatically. This is a deliberate design choice in Sentry's upgrade mechanism.
--backup or --create-snapshot) exists to trigger automatic backup creation.The absence of automatic backups means administrators must handle data protection manually. This design likely prioritizes simplicity and assumes operators will manage their own backup strategies for production environments.
pg_dump -U sentry_user -h localhost sentry_db > sentry_backup_$(date +%F).sql before upgrading.config/ directory contents and any environment files (.env, sentry.conf.py).uploads/ directory if custom media is stored locally.sentry --version for potential rollback reference.If an upgrade fails, the typical recovery path is:
psql -U sentry_user -h localhost sentry_db < sentry_backup_2024-01-15.sql.Verify service health with sentry checkup after restoration.
To confirm the current behavior in your environment:
sentry upgrade --help and review available options—backup flags are not present in any released version.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.