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

Implement Backup Compression and Decompression #48

Open
8 tasks
denisakp opened this issue Nov 18, 2024 · 0 comments
Open
8 tasks

Implement Backup Compression and Decompression #48

denisakp opened this issue Nov 18, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request invalid This doesn't seem right priority:medium important features but less urgent
Milestone

Comments

@denisakp
Copy link
Owner

Overview

To improve the manageability and efficiency of handling backup files, we want to implement a feature to compress backups into tar.gz format before uploading them to storage backends. This enhancement applies to backups for:

  • PostgreSQL (both plain and directory formats)
  • MySQL (plain SQL)
  • MongoDB (directory format backups)

The compressed backups will simplify storage and retrieval processes, reduce upload times, and optimize space usage on storage backends. Additionally, we require a robust decompression function to handle previously compressed files, ensuring fault tolerance and efficient resource utilization.

Why This Change is Necessary

  • Reduced Storage and Bandwidth Usage: Compressing backups reduces file size, minimizing storage costs and speeding up uploads/downloads.
  • Simplified Management: By compressing MongoDB directory backups and PostgreSQL directory format backups into single files, we streamline handling and retrieval.
  • Scalability: Optimizing compression and decompression using Go routines ensures that the solution remains performant even with large datasets.
  • Fault Tolerance: Backups should be reliable even in the event of failures during compression or decompression. Implementing a robust system ensures data integrity.

Acceptance Criteria

  • Compress PostgreSQL plain and directory backups into tar.gz format before upload
  • Compress MySQL plain backups into tar.gz format
  • Compress MongoDB directory backups into tar.gz format to create a single compressed file
  • Implement decompression functionality for tar.gz files that were previously compressed using this system
  • Ensure that both compression and decompression processes are fault-tolerant and optimized for concurrency using Go routines

Technical Details

  1. Compression Functionality
  • Implement a CompressBackup function that compresses backups into tar.gz format.
  • Utilize Go routines for parallel compression to optimize performance, especially for large databases.
  • Handle errors gracefully, ensuring partial failures do not leave corrupted archives
  1. Decompression Functionality
  • Implement a DecompressBackup function to handle extracting tar.gz files
  • Ensure fault tolerance with retry mechanisms and optimized Go routines
  • Validate the integrity of decompressed files before considering the process successful

Tasks

  • Implement CompressBackup function with fault tolerance and concurrency
  • Implement DecompressBackup function with the same reliability features
  • Integrate compression into the backup process before uploading to storage backends
@denisakp denisakp added enhancement New feature or request invalid This doesn't seem right priority:medium important features but less urgent labels Nov 18, 2024
@denisakp denisakp added this to the v1.0 milestone Nov 18, 2024
@denisakp denisakp self-assigned this Nov 18, 2024
@denisakp denisakp moved this to In Progress in Sentinel Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right priority:medium important features but less urgent
Projects
Status: In Progress
Development

No branches or pull requests

1 participant