Skip to content

Add flag to disable tagging - #82

Open
stevenwhayes wants to merge 2 commits into
tizbac:masterfrom
sweatycomputing:backblaze-b2-errors
Open

Add flag to disable tagging#82
stevenwhayes wants to merge 2 commits into
tizbac:masterfrom
sweatycomputing:backblaze-b2-errors

Conversation

@stevenwhayes

Copy link
Copy Markdown

This pull request adds a -disable-tagging boolean flag that allows the proxy to work with providers such as backblaze and cloudflare that do not support object tagging.

Successfully tested against Backblaze B2, have not tested other providers.

Some S3-compatible providers do not support object tagging APIs. When
GetObjectTagging is called, it may return empty tags, and PutObjectTagging
may be rejected. This was causing index.json.blob files to be corrupted with
tagging XML instead of actual blob content, resulting in "unable to parse raw
blob - wrong magic (500)" errors during file-level restore.

Changes:
- Add --disable-tagging command-line flag to both pmoxs3backuproxy and garbagecollector
- Skip all S3 tagging operations when flag is enabled
- Update ListSnapshots() to skip reading UserTags when tagging disabled
- Update ReadTags() to return empty map when tagging disabled
- Update PUT /notes and PUT /protected endpoints to skip PutObjectTagging with warning
- Notes and protection features gracefully degrade when tagging is disabled

This allows pmoxs3backuproxy to work correctly with S3 providers that don't
support tagging when run with --disable-tagging flag.
- Add comprehensive CLAUDE.md documenting the B2 compatibility fix
- Update README.md with --disable-tagging flag usage
- Update .gitignore to exclude built binaries (local and goreleaser)

The --disable-tagging flag fixes index.json.blob corruption on S3
providers that don't support object tagging (like Backblaze B2).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant