Skip to content

Add Sandbox backup/restore API docs#28449

Open
ask-bonk[bot] wants to merge 1 commit intoproductionfrom
opencode/issue28448-20260219172736
Open

Add Sandbox backup/restore API docs#28449
ask-bonk[bot] wants to merge 1 commit intoproductionfrom
opencode/issue28448-20260219172736

Conversation

@ask-bonk
Copy link
Contributor

@ask-bonk ask-bonk bot commented Feb 19, 2026

All done. Here is a summary of the changes:

Summary

Created documentation for the Sandbox SDK backup and restore API (from cloudflare/sandbox-sdk#396). Four files were changed:

New files

  1. src/content/docs/sandbox/api/backups.mdx - API reference page documenting:

    • createBackup() method - creates point-in-time squashfs snapshots uploaded to R2
    • restoreBackup() method - restores backups using FUSE overlayfs with copy-on-write
    • All types: BackupOptions, DirectoryBackup, RestoreBackupResult
    • Usage patterns: checkpoint/restore, error handling
    • Behavioral notes: 500 MB limit, serialized operations, serializable handles
  2. src/content/docs/sandbox/guides/backup-restore.mdx - How-to guide covering:

    • Prerequisites (R2 bucket creation, BACKUP_BUCKET binding)
    • Create and restore workflows
    • Checkpoint and rollback pattern
    • Storing backup handles in KV/D1/DO storage
    • Named backups, TTL configuration
    • Copy-on-write behavior explanation
    • Error handling with specific error codes
    • Best practices

Modified files

  1. src/content/docs/sandbox/api/index.mdx - Added Backups card to the API reference navigation
  2. src/content/docs/sandbox/configuration/wrangler.mdx - Added "Backup storage" section documenting the BACKUP_BUCKET R2 binding

Validation

  • npm run check - 0 errors, 0 warnings
  • npm run format:core:check - all files pass Prettier

Closes #28448

github run

Add documentation for the new createBackup() and restoreBackup() methods
introduced in cloudflare/sandbox-sdk#396.

- New API reference page: /sandbox/api/backups/
- New how-to guide: /sandbox/guides/backup-restore/
- Updated API index with Backups card
- Updated Wrangler config page with BACKUP_BUCKET R2 binding docs

Closes #28448
@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/sandbox/ @whoiskatrin, @ghostwriternr, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add docs for sandbox sdk for https://github.com/cloudflare/sandbox-sdk/pull/396

2 participants

Comments