Object Storage: Buckets & Lifecycle Rules
Harry
· 14 Sep 2026
· 1 views
Advertisement
Objects, buckets, namespaces
Object Storage is for files, images, backups and archives — not for databases. Each object has a key (its path), data and metadata; objects live in a bucket, buckets under a region in your tenancy’s object-storage namespace.
Create a bucket (10 GB free)
oci os bucket create \
--namespace $NS --name groovygrails-books \
--compartment-id $COMP_OCID
# core of the namespace is in your tenancy info; list it with:
oci os ns getOr click Object Storage & Archive Storage → Buckets → Create Bucket. Decide:
- Visibility: keep Private unless the objects are meant for the public.
- Versioning + Object lock: turn on for backup buckets — protects against accidental deletion/overwrite.
Lifecycle rules automate hygiene
Add a Lifecycle Rule so untouched objects auto-tier after a set number of days — free bucket management without scripts:
oci os bucket update \
--namespace $NS --bucket-name groovygrails-books \
--lifecycle-policy-rules-file rules.json
# rules.json:
# {
# "items": [{
# "action": "ARCHIVE",
# "timeAmount": 30, "timeUnit": "DAYS",
# "isEnabled": true
# }]
# }30 days → ARCHIVE (cheap, durable, still retrieved on demand). Combined with versioning you get accidental-delete protection and automatic archival cost savings in one rule.