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

BAR-113: Add --min-chunk-size option to barman-cloud-backup #849

Merged

Commits on Sep 27, 2023

  1. Allow minimum chunk size to be specified

    Adds a new option, `--min-chunk-size`, to `barman-cloud-backup`. If set
    then this will be used when setting the minimum size of an upload chunk
    in a multipart upload. The only guarantee Barman offers here is that
    the upload chunk size will be greater than this value - the actual
    chunk size used will be whichver is greatest of: `--min-chunk-size`,
    the `MIN_CHUNK_SIZE` for the cloud provider, or the calculated chunk
    size based on the `max_archive_size` and the `MAX_CHUNKS_PER_FILE`
    property of the cloud interface.
    
    This can be used to ensure uploaded chunks are not smaller than the
    specified value.
    
    Relates to BAR-113.
    mikewallace1979 committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    ca9e521 View commit details
    Browse the repository at this point in the history
  2. Do all chunk_size setting in one place

    Rather than test the `--min-chunk-size` against the calculated chunk
    size in one place and then test the result against the cloud interface
    `MIN_CHUNK_SIZE` in another, we peform all `chunk_size` setting checks
    in the `CloudUploadController` and update `CloudTarUploader` so that it
    is just given the chunk size by the upload controller.
    
    Relates to BAR-113.
    mikewallace1979 committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    983b737 View commit details
    Browse the repository at this point in the history
  3. Verify --max-archive-size and --min-chunk-size options in tests

    Updates the unit tests for the `CloudBackupUploader` creation such that
    they validate that both `--max-archive-size` and the new
    `--min-chunk-size` options are passed to the `CloudBackupUploader`.
    
    Relates to BAR-113.
    mikewallace1979 committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    98088d8 View commit details
    Browse the repository at this point in the history
  4. Update CloudTarUploader tests for chunk_size

    Update tests so that chunk_size is now passed to CloudTarUploader
    instead of being read from the cloud interface.
    
    Relates to BAR-113.
    mikewallace1979 committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    6643aa9 View commit details
    Browse the repository at this point in the history
  5. Add unit tests for CloudUploadController

    Adds tests for ClourUploadController which verify that it computes the
    correct max_archive_size and chunk_size given the supplied arguments
    and cloud interface properties.
    
    Relates to BAR-113.
    mikewallace1979 committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    83f6951 View commit details
    Browse the repository at this point in the history