1
0
mirror of https://github.com/rclone/rclone.git synced 2026-02-20 19:33:28 +00:00
Files
rclone/backend
Chris 7d0a8bf850 s3: add Object Lock support
Add support for S3 Object Lock with the following new options:

- --s3-object-lock-mode: set retention mode (GOVERNANCE/COMPLIANCE/copy)
- --s3-object-lock-retain-until-date: set retention date (RFC3339/duration/copy)
- --s3-object-lock-legal-hold-status: set legal hold (ON/OFF/copy)
- --s3-bypass-governance-retention: bypass GOVERNANCE lock on delete
- --s3-bucket-object-lock-enabled: enable Object Lock on bucket creation
- --s3-object-lock-set-after-upload: apply lock via separate API calls

The special value "copy" preserves the source object's setting when used
with --metadata flag, enabling scenarios like cloning objects from
COMPLIANCE to GOVERNANCE mode while preserving the original retention date.

Includes integration tests that create a temporary Object Lock bucket covering:
- Retention Mode and Date
- Legal Hold
- Apply settings after upload
- Override protections using bypass-governance flag
The tests are gracefully skipped on providers that do not support Object Lock.

Fixes #4683
Closes #7894 #7893 #8866
2026-02-20 16:40:24 +00:00
..
2025-10-21 18:56:06 +01:00
2025-06-12 18:31:01 +01:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2026-01-24 12:35:02 +00:00
2025-02-28 11:31:14 +00:00
2024-08-12 13:35:44 +01:00
2025-02-28 11:31:14 +00:00
2026-02-20 16:40:24 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-11-13 13:47:40 +00:00