-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88da67e
commit 249a4dd
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |