Menu

Vercel Sandbox snapshots now allow custom retention periods - Vercel
📰
0

Vercel Sandbox snapshots now allow custom retention periods - Vercel

Vercel News·Tom Lienard·4 days ago
#o6FYbpvX
Reading 0:00
15s threshold

Snapshots created with Vercel Sandbox now have configurable expiration, instead of the previous 7 days limit, along with higher defaults.

import { Sandbox } from '@vercel/sandbox';

import ms from 'ms';

const sandbox = Sandbox.create();

sandbox.snapshot({ expiration: ms('1d') })

The expiration can be configured between 1 day to infinity. If not provided, the default snapshot expiration is 30 days.

You can also configure this in the CLI.

# Create a snapshot of a running sandbox

sandbox snapshot sb_1234567890 --stop

# Create a snapshot that expires in 14 days

sandbox snapshot sb_1234567890 --stop --expiration 14d

# Create a snapshot that never expires

sandbox snapshot sb_1234567890 --stop --expiration 0

Read the documentation to learn more about snapshots.

Read More