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

Prune old tile file backups and detailed diff reports from GCP bucket #706

Open
zigouras opened this issue Jun 24, 2024 · 1 comment
Open

Comments

@zigouras
Copy link
Collaborator

zigouras commented Jun 24, 2024

Describe the task

The backup and diff functionality ends with a pruning of old backed up schemas older than a configured number of days, currently 365. This is to save space in the database. Similarly, we can delete the timestamped backed up tile files and detailed diff reports from the Google Cloud bucket.

Currently, the tiles files backups are generated after every run of the back-end script, regardless of whether a reload is forced or not, and never deleted. The detailed diff reports are generated if there are any differences found during a run of the back-end script with forced reloading, and never deleted.

The tiles file backups are in the format backups/name_%Y_%m_%dt%H_%M_%S.ext, e.g. backup/vacant_properties_tiles_2024_06_02t17_17_08.pmtiles or backup/vacant_properties_tiles_staging_2024_06_02t16_34_41.pmtiles

The detailed diff reports are in the format diff/%Y_%m_%dt%H_%M_%S/table_name.html, e.g. diff/2024_05_10t14_50_53/vacant_properties.html.

Using the same cutoff as used to prune the old postgres schema backups define in config.py::max_backup_schema_days, delete the old tiles file backups and detailed diff report folders after a force reload run of the back-end script.

Acceptance Criteria

Coding of the above requirement plus unit tests to assert functionality.

Additional context

The existing Python function backup_archive_database.py::BackupArchiveDatabase::prune_old_archives.
Issues #520, #662.

Copy link

github-actions bot commented Oct 1, 2024

This issue has been marked as stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do
Development

No branches or pull requests

1 participant