import { useParams } from 'common' import { Admonition } from 'ui-patterns/Admonition' import { BASE_PATH } from 'ui-patterns/CommandMenu/prepackaged/shared/constants' import { DocsButton } from '@/components/ui/DocsButton' import { InlineLink } from '@/components/ui/InlineLink' import { DOCS_URL } from '@/lib/constants' export const StorageVersioningPreview = () => { const { ref = '_' } = useParams() return (

Storage object versioning keeps a noncurrent copy of a file every time it's overwritten or archived. Preview, compare and restore any earlier version from the file preview panel, and use lifecycle policies to expire noncurrent versions automatically.

storage object versioning settings and version history preview

Enabling this preview will:

  • Add an Object versioning toggle and lifecycle policy settings to each bucket in{' '} Storage
  • Show a version history in the file preview panel, where you can compare an earlier version against the current one and restore it
  • Archive files instead of deleting them in versioned buckets, so you can bring them back if needed
  • Let you expire noncurrent versions automatically by age, by how many to keep, or both

Storage usage and retained versions

Retained versions count toward Storage usage and may increase your bill. Set a lifecycle policy to expire versions you no longer need. Disabling object versioning on a versioned bucket suspends it but retains its existing versions.

) }