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 local backups support for backup-clean command. #17

Merged
merged 5 commits into from
Jul 22, 2024

Conversation

woblerr
Copy link
Owner

@woblerr woblerr commented Jul 20, 2024

Added local backups support for backup-clean command.
Added --backup-dir and --parallel-process flags for backup-clean command.

For local backups the following logic are applied:

  • If the --backup-dir option is specified, the deletion will be performed in provided path.
  • If the --backup-dir option is not specified, but the backup was made with --backup-dir flag for gpbackup, the deletion will be performed in the backup manifest path.
  • If the --backup-dir option is not specified and backup directory is not specified in backup manifest, the deletion will be performed in backup folder in the master and segments data directories.
  • If backup is not local, the error will be returned.

For non local backups the following logic are applied:

  • If the --plugin-config option is specified, the deletion will be performed using the storage plugin.
  • If backup is local, the error will be returned.

Added update mechanism for history file when some errors occurred. Previously, the status did not change when an error occurred.

Anyway, need to go through all backups and collect a list that will be deleted, taking into account the conditions for deletion.
Delete unnecessarily noisy log messages  and improve flags validation.
@woblerr woblerr added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 20, 2024
@woblerr woblerr self-assigned this Jul 20, 2024
@woblerr woblerr changed the title Add local backup support for backup-clean command. Add local backups support for backup-clean command. Jul 20, 2024
@woblerr woblerr marked this pull request as ready for review July 20, 2024 20:37
@woblerr woblerr merged commit d1feaed into master Jul 22, 2024
6 checks passed
@woblerr woblerr deleted the backup_clean_local branch July 22, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant