Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DM-48369] Automate restore of InfluxDB OSS backups in Sasquatch #4085

Merged
merged 6 commits into from
Jan 14, 2025

Conversation

afausti
Copy link
Member

@afausti afausti commented Jan 14, 2025

We assume that sasquatch-backup CronJob for influxdb-oss-full is enabled and creating backup items following the configured schedule, for example:

backupItems:
  - name: "influxdb-oss-full"
    enabled: true
    retentionDays: 3

The Job logs show the Backup contents, where we identify the latest backup we want to restore from:

Backup contents:
649M	/backup/sasquatch-influxdb-oss-full-20250113T030120Z

We add the restore configuration, and sync the sasquatch-restore CronJob in Argo CD

restoreItems:
    - name: "influxdb-oss-full"
      enabled: true
      backupTimestamp: "20250113T030120Z"

From where we can run a sasquatch-restore Job.

The restore script is implemented in this PR lsst-sqre/sasquatch#56

- Use retention_days in the backup script but stick with the camel case convention here.
- Use a non-triggering schedule to ensure it doesn’t run automatically.
- A sasquatch-restore Job can be triggered manually from Argo CD or using kubectl create job --from=cronjob/sasquatch-restore.
- Never restart the restore pod
- Prevent retries if job fails
- Even InfluxDB OSS support only full backups, make the backup type explicit
@afausti afausti added this pull request to the merge queue Jan 14, 2025
Merged via the queue into main with commit a7eb7b9 Jan 14, 2025
7 checks passed
@afausti afausti deleted the tickets/DM-48369 branch January 14, 2025 22:49
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