• 1 min read 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 sandboxsandbox snapshot sb_1234567890 –stop # Create a snapshot that expires in 14 dayssandbox snapshot sb_1234567890 –stop –expiration 14d # Create a snapshot that never expiressandbox snapshot sb_1234567890 –stop –expiration 0 Read the documentation to learn more about snapshots.

Article Summaries:

  • Vercel has updated its Sandbox service to give developers greater control over snapshot retention. Previously, snapshots automatically expired after seven days, but the new feature allows setting a custom expiration ranging from one day to unlimited. If no expiration is specified, the default is now 30 days. The change can be applied via the JavaScript SDK or the CLI, using flags such as --expiration 14d or --expiration 0 for indefinite retention. The update aims to improve flexibility for teams managing sandbox environments and their data lifecycle.

Sources: