Skip to content

Commit

Permalink
add backup guide
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Oct 28, 2024
1 parent 88da67e commit 249a4dd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/malta.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"sidebar": [
{
"title": "Faroe server",
"pages": [["Getting started", "/faroe-server/getting-started"]]
"pages": [
["Getting started", "/faroe-server/getting-started"],
["Database backup", "/faroe-server/database-backup"]
]
},
{
"title": "Email and password",
Expand Down
21 changes: 21 additions & 0 deletions docs/pages/faroe-server/database-backup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "Database backup"
---

# Database backup

Faroe does not backup its SQLite database. We recommend using [Litestream](https://litestream.io) to create database replicas locally or externally in services like S3.

Use the `replicate` command to create a replica. Faroe should be ran as a child process using the `exec` option.

```
litestream replicate -exec="./faroe serve" faroe_data/sqlite.db file://backup
```

Use the `restore` command to restore the database from a replica.

```
litestream restore -o faroe_data/sqlite.db file://backup
rm sqlite.db.tmp-shm
sqlite.db.tmp-wal
```

0 comments on commit 249a4dd

Please sign in to comment.