commit 19ffda3c2027872cef53c14f5188676ae2fbdb3a
parent 9ca6c9fc02bcd644bbce29f73a9c4789c555c51b
Author: martin@ashbysoft.com <martin@ashbysoft.com>
Date: Sun, 14 Nov 2021 11:34:56 +0000
New post on backups
Diffstat:
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/content/posts/2021-11-14-backups.md 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.