Immutable backups (Object Lock)
A stolen storage key, or ransomware holding one, can delete backups. With immutable backups on, every version Caryvane writes is locked with S3 Object Lock: until its lock ends, nobody can delete or overwrite that version, whoever holds the key.
How it works #
Immutability is set per storage. Every upload to it carries its own lock for the number of days you choose, counted from the moment it is written. The bucket's default retention is not used, so temporary files are never locked by accident.
- A delete without a version id still succeeds. It hides the file behind a delete marker, and the locked version stays underneath, ready to restore.
- Deleting a specific version is refused until its lock ends. Caryvane's own version pruning never tries: a version that is past your retention but still locked is held, and it is removed on a later run once its lock has ended. Held versions are not errors.
- Cloud-drive saves are not locked unless you tick Lock cloud-drive saves too. A drive is a working copy, so every save would become a locked version, billed until its lock ends.
The two modes #
| Mode | Who can remove a lock early | Use it for |
|---|---|---|
| Compliance (the default) | Nobody, the storage account owner and Caryvane included. | Production backups |
| Flexible (can be lifted by an administrator): S3 Governance mode | Only a storage key holding the s3:BypassGovernanceRetention permission. Caryvane's key never has it. | Trying it out |
When you first switch immutability on, Compliance is selected. It asks you to type a confirmation before it saves, because its locks cannot be shortened or removed by anyone, and storage is billed until each lock ends. Choose Flexible instead if you want an administrator to be able to lift a lock. A storage that already has a lock keeps its mode. Changing the setting later only affects new writes; locks already written run their course.
Turning it on #
- Use a bucket with Object Lock. Wasabi and MinIO can only switch Object Lock on when a bucket is created; AWS can also add it to an existing versioned bucket. On the storage's ⋮ menu → Immutable backups… → New locked bucket… creates one for you, with versioning on.
- Point the jobs at it, or make it the storage's default bucket.
- Set version history first. Retention on the storage, and on any job or drive with its own setting, must keep versions at least as long as the lock. Saving a lock longer than the retention is refused with the reason.
- Choose the mode and the days (1 to 3650) and save. Compliance is selected unless you pick Flexible. Test on the storage row then reports whether the bucket has Object Lock.
Not immutable? If a locked storage writes to a bucket without Object Lock, the backup still runs, unlocked, and the run is marked Warning: Not immutable: bucket … has no Object Lock. The storage row shows a red Not immutable badge. A backup is never failed over it.
What is supported #
| Storage | Immutable backups |
|---|---|
| Amazon S3 | Yes. Object Lock can be added to an existing versioned bucket, or set at creation. |
| Wasabi | Yes, on buckets created with Object Lock. |
| Backblaze B2 | Yes, on buckets with Object Lock enabled. |
| MinIO | Yes, on buckets created with Object Lock. |
| Other S3-compatible endpoints | If the endpoint implements Object Lock; Test says whether it does. |
| Azure Blob | Not yet (planned, using version-level immutability). |
| Cloudflare R2, DigitalOcean Spaces, Linode, Vultr, Egnyte, OneDrive, SharePoint, Dropbox, Google Drive, SFTP, FTP, SMB, local folders | No. These have no Object Lock. |
Proxmox and Hyper-V #
- Proxmox datastores. A Proxmox backup is made of deduplicated chunks shared between snapshots, so a chunk written months ago may be part of last night's backup. Each chunk and index is locked for your lock period plus a 10-day generation, and the weekly garbage collection lengthens the lock on every chunk still in use whose lock would end within that generation. A chunk is therefore always locked at least as long as the newest snapshot that uses it. When garbage collection meets an unused chunk the bucket will not delete yet, it keeps it (the log shows kept (still locked)) and tries again next week; that never fails the run.
- Garbage collection must run. On a locked datastore, if garbage collection has not run for 7 days the datastore's job shows a Warning saying so. Check a cluster node with a Caryvane agent is online, then run the datastore's job now.
- Hyper-V. A Hyper-V backup is a full copy of each disk (re-based weekly) followed by daily changes that depend on it. The full copy is locked for your lock period plus the 7-day re-base interval, so it outlives every change built on it.
Getting space back #
On a locked bucket, deleting or replacing a backup only hides the old version; it still takes space until it is deleted by its version id. AWS can do that with lifecycle rules; Wasabi and Backblaze B2 cannot. So every night Caryvane looks at each locked storage and deletes an old version for good only when all of these are true:
- its lock has ended;
- it is older than the version history you keep (on the job, drive or storage), or its file was deleted longer ago than the storage's deleted-items window;
- no legal hold covers it.
Each night's work is bounded; a very large bucket is worked through over several nights. The current version of a file is never touched.
Recover to a point in time #
This is what the locks are for. If ransomware or someone with a stolen key deleted or overwrote backups, open the storage's Browse, go into the container or folder, and use Recover to a point in time (the clock icon). Choose a date and time from before the damage:
- files deleted since then come back (their delete markers are removed);
- files changed since then get the version from that time copied back as the current version;
- files created since then are left as they are, and nothing is deleted.
It runs in the background and shows its progress; closing the window does not stop it. It needs Manager or administrator rights and is recorded in the audit trail. It works on any versioned S3, Wasabi, B2 or MinIO storage, and is only as good as the versions still kept: with immutable backups on, nothing inside the lock period can have been removed. AI assistants can start one with the MCP tool recover_to_point_in_time (keys with full access) and follow it with get_storage_operation.
Agents must be up to date #
Every agent that writes to a locked storage must be 1.0.307 or later: the version that locks Proxmox chunks and lengthens their locks, and locks Hyper-V full copies for the extra week. While an older agent writes to the storage (a job, a cloud drive, or a Proxmox node using it), saving immutability is refused with the list of machines to update. Cloud Agents are always current.
Permissions for the storage key #
On AWS, give the key Caryvane uses these permissions on the bucket and its objects, in addition to the usual ones on the S3 page:
s3:PutObjectRetentionands3:GetObjectRetention: write and read each version's lock.s3:GetBucketObjectLockConfiguration: check that the bucket has Object Lock.s3:ListBucketVersions,s3:GetObjectVersion,s3:DeleteObjectVersion: version history, and pruning versions whose locks have ended.s3:PutObjectLegalHoldands3:GetObjectLegalHold: the storage-level legal hold (see Legal hold). If you leave these out, holds are still enforced by Caryvane but not flagged in the bucket.- To create locked buckets from the console:
s3:CreateBucket,s3:PutBucketObjectLockConfigurationands3:PutBucketVersioning.
Do not grant s3:BypassGovernanceRetention. Without it, even Flexible locks cannot be removed with Caryvane's key. Wasabi, B2 and MinIO keys with access to the bucket can do all of the above.
What it costs #
A locked version is billed by your storage provider until its lock ends, even after Caryvane's retention would have removed it, and Wasabi also bills each object for its minimum storage period. Choose the lock to match the retention you really want, and ask us about anything else.