Enable S3 versioning on your vault
An AI that writes to your vault will sometimes overwrite content, delete the wrong file, or apply a patch that breaks one. S3 versioning keeps every previous version of every object, so you can recover from any of these.
Versioning is a property of the bucket, so you enable it on your S3 provider. Once it is on, Vaulken detects it and gives your AI two extra MCP tools for browsing and restoring history.
Why enable versioning
Without versioning, an edit_file or patch_file call overwrites the previous content and there is no way back. With versioning enabled:
- Every write creates a new version instead of replacing the old one
- A deleted file gets a delete marker instead of being removed
- You can restore any previous version at any time
- Old versions take space, so storage costs a little more. Most providers offer lifecycle rules that expire them after a while.
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, use a provider that supports it (AWS, Scaleway, MinIO, Backblaze B2).
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
Without a lifecycle policy, old versions accumulate forever. Add a rule that expires 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 history and caps storage growth.
Verify versioning is active
Upload a file twice and check 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
Vaulken needs no configuration change. The indexer checks the bucket's versioning status on its next run, a few minutes later at most, and turns on two MCP tools for the vault:
list_versionslists the previous versions of a file with their IDs, timestamps and sizes. Available on both URLs.restore_versionmakes a previous version current again. The version it replaces is kept as another version. Available on the read-write URL only.
Your AI can also read a past version without restoring it by passing a version ID to read. The provider's console or CLI still works for browsing and restoring versions by hand.
Related guides
- Connect Claude to Vaulken: where
list_versionsandrestore_versionappear in the tool list - Getting Started: create the vault the bucket is attached to