aboutsummaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/posts/2021-11-14-backups.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/content/posts/2021-11-14-backups.md b/content/posts/2021-11-14-backups.md
new file mode 100644
index 0000000..09689eb
--- /dev/null
+++ b/content/posts/2021-11-14-backups.md
@@ -0,0 +1,15 @@
+---
+title: "Backups"
+date: 2021-11-14T11:12:44Z
+draft: false
+---
+
+I've recently setup a full system backup for my raspberry pi home server, backing up to my NAS over NFS. Working backups give me the confidence to use it for more critical things like email, calendar and contacts.
+
+I've used [restic](https://github.com/restic/restic) as it does convenient, password-encrypted, differential backups to a variety of backends.
+
+I've set it up with a systemd timer to trigger it. The script I've written shuts down all services so the file system isn't changing too much underneath while the backup is working, mounts the backup location, does the backup, then unmounts the backup again before restarting the rest of the system. I think it's important to disconnect the backup location during normal operation to prevent damage to backups should some bad command run, like `rm -rf /`.
+
+I've tested restoring the whole system to a new SD card, and while it's not perfect, it does work with only minor adjustments after restore.
+
+In future I'll probably copy the backup to an offsite system like [backblaze B2](https://www.backblaze.com/b2/cloud-storage.html), or I'll set up an arrangement with a friend who also has some space on a NAS and a decent 'net connection. I'll also configure restic to prune old backups to save on space.