]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - doc/md/Backup-and-restore.md
**General rewording, proof-reading, deduplication, shortening, reordering, simplifica...
[github/shaarli/Shaarli.git] / doc / md / Backup-and-restore.md
diff --git a/doc/md/Backup-and-restore.md b/doc/md/Backup-and-restore.md
new file mode 100644 (file)
index 0000000..e7e2775
--- /dev/null
@@ -0,0 +1,11 @@
+## Backup and restore
+
+All data and [configuration](Shaarli-configuration.md) is kept in the `data` directory. Backup this directory: 
+
+```bash
+rsync -avzP my.server.com:/var/www/shaarli.mydomain.org/data ~/backups/shaarli-data-$(date +%Y-%m-%d_%H%M)
+```
+
+It is strongly recommended to do periodic, automatic backups to a seperate machine. You can automate the command above using a cron job or full-featured backup solutions such as [rsnapshot](https://rsnapshot.org/)
+
+To restore a backup, simply put back the `data/` directory in place, owerwriting any existing files.
\ No newline at end of file