AIFeed

Vercel Drives now supports named snapshots

Summary

You can now create named snapshots of a Vercel Drive . Each one is a read-only copy of the drive's contents at the moment you create it. Later writes to the drive don't change it. You can mount the snapshot in multiple sandboxes at once, or fork it into a new writable drive to continue from that point. Until now, a drive snapshot lasted only as long as the sandbox that mounted it. drive.snapshot() still works that way. With Vercel CLI 68.3.0 or later, run: Update @vercel/drives and @vercel/sandbox for TypeScript, or vercel-drives and vercel-sandbox for Python, then run: Each named snapshot is billed as drive storage for its used size until you delete it. You can also view and delete a drive's named snapshots in the Vercel dashboard. Named snapshots are separate from Sandbox snapshots, which save a sandbox's whole filesystem. See when to use drives vs Sandbox snapshots . Named snapshots are available on Hobby, Pro, and Enterprise plans. Learn more in the Drives documentation . Read more

Original text(via Vercel Blog)

You can now create named snapshots of a Vercel Drive. Each one is a read-only copy of the drive's contents at the moment you create it. Later writes to the drive don't change it. You can mount the snapshot in multiple sandboxes at once, or fork it into a new writable drive to continue from that point.

Until now, a drive snapshot lasted only as long as the sandbox that mounted it. drive.snapshot() still works that way.

With Vercel CLI 68.3.0 or later, run:


        vercel drives snapshot workspace-cache baselinevercel drives snapshots list workspace-cachevercel drives snapshots fork baseline workspace-cache-restored --drive workspace-cache
      

Create, list, and fork named snapshots with the Vercel CLI.

Update @vercel/drives and @vercel/sandbox for TypeScript, or vercel-drives and vercel-sandbox for Python, then run:


        import { Drive } from '@vercel/drives';import { Sandbox } from '@vercel/sandbox';
const drive = await Drive.get({ name: 'workspace-cache' });const snapshot = await drive.snapshot({ name: 'baseline' });
const sandbox = await Sandbox.create({  region: snapshot.region,  mounts: { '/data': snapshot },});
const restored = await snapshot.fork({ name: 'workspace-cache-restored' });
      

Create, mount, and fork a named snapshot with the TypeScript SDK.

Each named snapshot is billed as drive storage for its used size until you delete it. You can also view and delete a drive's named snapshots in the Vercel dashboard.

Named snapshots are separate from Sandbox snapshots, which save a sandbox's whole filesystem. See when to use drives vs Sandbox snapshots.

Named snapshots are available on Hobby, Pro, and Enterprise plans. Learn more in the Drives documentation.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by Vercel Blog
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗