Skip to content

Commit 7cb191e

Browse files
authored
[D1] Cross-referencing example of exporting D1 into R2 via REST API (#20062)
* Linking Backup and save D1 database into D1 docs. * Adding the example into the Example sidebar from D1. * Tweaking example link wording. * Renaming title of the example. * Fixing title. * Finalising wording.
1 parent 1538065 commit 7cb191e

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
pcx_content_type: navigation
3+
title: Export and save D1 database
4+
external_link: /workflows/examples/backup-d1/
5+
sidebar:
6+
order: 1
7+
---

src/content/docs/d1/reference/time-travel.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ wrangler d1 time-travel info YOUR_DATABASE
117117
`wrangler d1 time-travel restore YOUR_DATABASE --bookmark=00000085-0000024c-00004c6d-8e61117bf38d7adb71b934ebbf891683`
118118
```
119119

120+
## Export D1 into R2 using Workflows
121+
122+
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.
123+
124+
Refer to the guide [Export and save D1 database](/workflows/examples/backup-d1/).
125+
120126
## Notes
121127

122128
- You can quickly get the Unix timestamp from the command-line in macOS and Windows via `date %+s`.

src/content/docs/workflows/examples/backup-d1.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
type: example
3-
summary: Backup D1 using export API and save it on R2
3+
summary: Export a D1 database into R2 storage with Workflows
44
tags:
55
- Workflows
66
- D1
77
- R2
88
languages:
99
- Typescript
1010
pcx_content_type: configuration
11-
title: Backup and save D1 database
11+
title: Export and save D1 database
1212
sidebar:
1313
order: 3
1414
description: Send invoice when shopping cart is checked out and paid for

0 commit comments

Comments
 (0)