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

Add Backup schedule #140

Merged
merged 5 commits into from
Jul 1, 2024
Merged

Add Backup schedule #140

merged 5 commits into from
Jul 1, 2024

Conversation

codingpaula
Copy link
Contributor

This PR adds a backup schedule to backup all files in the persistence folder (~/.rosys) once a day as suggested here #108.

The location of the backup, the time it's performed and the number of backup files that are kept is configurable.

Changes:

  • move writing of an export file to persistence.registry
  • add BackupSchedule itself
  • add documentation

@codingpaula codingpaula added the enhancement New feature or request label Jun 28, 2024
@codingpaula codingpaula added this to the 0.10.11 milestone Jun 28, 2024
@codingpaula codingpaula self-assigned this Jun 28, 2024
@rodja
Copy link
Member

rodja commented Jun 29, 2024

Cool. Only problem is that if a miss-configuration is not discovered in the time frame, it is still lost. An alternative approach would be Something like log rotatation: compare the stored version with the new data in persistence.registry.backup(). If they have changed save the old data in a backup folder with timestamp and then overwrite with new data.

@falkoschindler
Copy link
Contributor

@rodja We first wanted to catch cases where we need to restore the configuration, but the last backup is months old.
Automatically backing up after every change to the persistent storage isn't practical in most cases, since we store very frequent data like KPIs. So we would need to create ZIP archives all the time.

@rodja
Copy link
Member

rodja commented Jun 29, 2024

I have not thought about high frequent updates like kpis. Maybe using git instead of zip would solve both cases? And later adding cloud backups by adding a remote?

@falkoschindler falkoschindler merged commit a59d910 into main Jul 1, 2024
2 checks passed
@falkoschindler falkoschindler deleted the backup-schedule branch July 1, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants