Enable S3 versioning on your BYOB vault
When your AI assistant writes or edits files in your vault, mistakes can happen: an overwrite that loses content, a deletion that was not intended, or a patch that breaks a file. S3 versioning keeps every previous version of every object, so you can always recover.
Managed vaults have versioning enabled by default. If you use BYOB (Bring Your Own Bucket), you need to enable it yourself on your S3 provider.
Why enable versioning
Without versioning, a write_file or replace_in_file call permanently overwrites the previous content. There is no undo. With versioning enabled:
- Every write creates a new version instead of replacing the old one
- Deleted files are not actually removed, they get a delete marker
- You can restore any previous version at any time
- Storage cost increases slightly (old versions take space), but most providers offer lifecycle rules to auto-expire old versions
Provider-specific guides
AWS S3
- Open the S3 console
- Select your bucket
- Go to the Properties tab
- Under Bucket Versioning, click Edit
- Select Enable and save
Or via CLI:
aws s3api put-bucket-versioning \
--bucket your-bucket-name \
--versioning-configuration Status=Enabled
Scaleway Object Storage
- Open the Scaleway console
- Select your bucket
- Go to Bucket settings
- Enable Versioning
Or via CLI (using aws-cli with Scaleway endpoint):
aws s3api put-bucket-versioning \
--bucket your-bucket-name \
--versioning-configuration Status=Enabled \
--endpoint-url https://s3.fr-par.scw.cloud
Cloudflare R2
R2 does not support S3 versioning as of March 2026. If you need version history with R2, consider using Vaulken managed storage instead.
Backblaze B2
- Log into your Backblaze account
- Go to Buckets
- Click Lifecycle Settings on your bucket
- Set Keep only the last version to a number greater than 1 (e.g., 10)
Note: B2 uses its own lifecycle system rather than standard S3 versioning. Setting "keep last N versions" achieves a similar result.
MinIO
mc version enable myminio/your-bucket-name
Or via the MinIO Console under Buckets > your-bucket > Summary > Versioning.
Recommended lifecycle policy
Versioning without a lifecycle policy means old versions accumulate forever. We recommend adding a rule to auto-expire non-current versions after 30 to 90 days:
AWS / Scaleway / MinIO
{
"Rules": [
{
"ID": "expire-old-versions",
"Status": "Enabled",
"NoncurrentVersionExpiration": {
"NoncurrentDays": 30
}
}
]
}
Apply it:
aws s3api put-bucket-lifecycle-configuration \
--bucket your-bucket-name \
--lifecycle-configuration file://lifecycle.json
This keeps 30 days of version history while preventing unlimited storage growth.
Verify versioning is active
After enabling versioning, you can verify it works by uploading a file twice and checking that both versions exist:
# Upload a file
echo "version 1" | aws s3 cp - s3://your-bucket/test.txt
# Overwrite it
echo "version 2" | aws s3 cp - s3://your-bucket/test.txt
# List versions
aws s3api list-object-versions --bucket your-bucket --prefix test.txt
You should see two versions with different VersionId values.
What happens in Vaulken
Once versioning is enabled on your bucket, Vaulken does not need any configuration change. Your vault works exactly the same, but every file modification is now protected by S3 version history. You can browse and restore versions directly from your S3 provider's console or CLI.