Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/content/docs/d1/examples/export-d1-into-r2.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
pcx_content_type: navigation
title: Export and save D1 database
external_link: /workflows/examples/backup-d1/
sidebar:
order: 1
---
6 changes: 6 additions & 0 deletions src/content/docs/d1/reference/time-travel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ wrangler d1 time-travel info YOUR_DATABASE
`wrangler d1 time-travel restore YOUR_DATABASE --bookmark=00000085-0000024c-00004c6d-8e61117bf38d7adb71b934ebbf891683`
```

## Export D1 into R2 using Workflows

You can automatically export your D1 database into R2 storage via REST API and Cloudflare Workflows. This may be useful if you wish to store a state of your D1 database for longer than 30 days.

Refer to the guide [Export and save D1 database](/workflows/examples/backup-d1/).

## Notes

- You can quickly get the Unix timestamp from the command-line in macOS and Windows via `date %+s`.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/workflows/examples/backup-d1.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
type: example
summary: Backup D1 using export API and save it on R2
summary: Export a D1 database into R2 storage with Workflows
tags:
- Workflows
- D1
- R2
languages:
- Typescript
pcx_content_type: configuration
title: Backup and save D1 database
title: Export and save D1 database
sidebar:
order: 3
description: Send invoice when shopping cart is checked out and paid for
Expand Down
Loading