Skip to content

feat: rollback.yml — automated rollback to timestamped backup - #24

Merged
vsutra-admin merged 1 commit into
ansible-deployfrom
feat/rollback-playbook
Jun 21, 2026
Merged

feat: rollback.yml — automated rollback to timestamped backup#24
vsutra-admin merged 1 commit into
ansible-deployfrom
feat/rollback-playbook

Conversation

@vsutra-admin

Copy link
Copy Markdown

Default behaviour: restores the most recent timestamped backup. Override with -e backup_timestamp=<DDMMYYYY_HHMMSS> for a specific one. Restores WAR + all three plugin tiers + MySQL connector + .release marker; out-of-scope (db schema, openspecimen.properties) documented. Fails fast with operator guidance if no backup exists or the requested timestamp is missing. Closes #30.

Default: restore the most recent timestamped backup (sorted by mtime).
Override: -e backup_timestamp=<DDMMYYYY_HHMMSS> to roll back to a specific one.

Restores:
  - openspecimen.war  (required — fails if backup is missing it)
  - plugins/default/*.jar, plugins/paid/*.jar, plugins/zustomer/*.jar
  - lib/mysql-connector-*.jar (when present in backup)
  - openspecimen_release_marker (when present in backup)

Out of scope (documented):
  - Database schema (no Liquibase rollback)
  - openspecimen.properties (config rollback — re-run site.yml instead)

Reuses the operator-friendly error format:
  - Fails fast and lists all available backups if requested timestamp missing
  - Fails fast with no-backups-found guidance if backup_dir is empty
  - Fails fast if backup is incomplete (no WAR)

docs/DEPLOY-UPGRADE.md
  - Rollback section rewritten — playbook usage replaces manual ssh+cp procedure
  - Restoration table documents what is and isn't restored
  - --check dry run documented
@vsutra-admin
vsutra-admin merged commit 29017f4 into ansible-deploy Jun 21, 2026
@vsutra-admin
vsutra-admin deleted the feat/rollback-playbook branch June 21, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant