backup: add storage interface and fs/s3 impl#1308
Merged
Merged
Conversation
9c1618d to
6f17b04
Compare
9d52d93 to
95376cf
Compare
261879e to
32f5f15
Compare
bb6fc6d to
fd06180
Compare
32f5f15 to
d47350d
Compare
Contributor
|
Please, fix static-code-check. |
2010f13 to
09473ad
Compare
patapenka-alexey
approved these changes
Jul 1, 2026
bigbes
requested changes
Jul 1, 2026
09473ad to
653d9c1
Compare
890d29b to
a669188
Compare
Implement local filesystem and S3-compatible backends. Closes TNTP-8210
Address review findings on the new lib/backup/storage backends: - s3: distinguish a missing key from a missing bucket. isKeyNotFound now matches only NoSuchKey, not any 404 (a missing bucket returns 404 as NoSuchBucket). Get also probes the object with a one-byte read (GET) rather than Stat (HEAD): a GET 404 has a body, so the real code is preserved; a HEAD 404 has none and is reported as NoSuchKey regardless. The probe also drops the extra HEAD request. - fs: Put flushes the data and parent directory to disk before returning, so a crash cannot leave an object present but truncated. - fs: Put widens the object mode from CreateTemp's 0600 to 0644, so a backup written by one user can be read by another. - fs: objectPath uses a relative-path escape check; the old string-prefix check rejected every key when the root resolved to /. - fs: Get rejects a key that resolves to a directory with ErrKeyNotFound instead of a later, opaque read error. - fs: Put enforces the size contract (non-negative, exact byte count) so a wrong size fails loudly instead of storing a short object; the Storage interface now documents the contract for both backends. - fs: New sweeps stale temp files left by interrupted Puts, which are otherwise hidden from List and cannot be removed through the API. - fs: List returns a non-nil empty slice, matching the s3 backend. - s3 integration test: tag integration_docker so unit:fullSkipDocker excludes it, matching the repo convention. Part of TNTP-8210
a669188 to
0849d6c
Compare
bigbes
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement local filesystem and S3-compatible backends.
Closes TNTP-8210