2.7 KiB
title, description, published, date, tags, editor, dateCreated
| title | description | published | date | tags | editor | dateCreated |
|---|---|---|---|---|---|---|
| Backups | What is backed up? Where is it backed up? look here! | true | 2022-04-30T20:10:24.250Z | maintanence, backup | markdown | 2021-09-02T08:29:45.542Z |
I use several methods of backup to keep important data stowed away. Below is an outline of what is backed up and how.
Local Backups are transitioning to Seafile - in progress! {.info}
Cloud Backups
The first and most reliable form of backup is a Restic repository stored on Backblaze B2.
Three things are currently backed up with B2:
- Photos (Path:
/Red-Vol/Media/Pictures, Bucket:Gerbil-TK) - Containers (Path:
/Red-Vol/Media/Containers, Bucket:Gerbil-TK-Containers) - Cloud Data gathered using Synching (Path:
/Red-Vol/Media/Cloud/Syncthing/, Bucket:Pukeko-XYZ-Cloud)
Backups run on a cron job which executes the following commands:
restic -r b2:Gerbil-TK backup /Red-Vol/Media/Pictures/ --exclude='*סתם*' --exclude='2021' --exclude='Photos from *'for photos.restic -r b2:Gerbil-TK-Containers backup --exclude=“photoprism” --exclude=“transmission” --exclude=“jekyll” --exclude=“minecraftserver” /Red-Vol/Media/Containersfor Docker containers.restic -r b2:Pukeko-XYZ-Cloud backup /Red-Vol/Media/Cloud/Syncthing/
Important Points
- Photoprism pictures are not backed up as their source directories are already backed up.
/homeis backed up under the Cloud backup.- Anything crucial is expected to be backed up via Syncthing, and from there to B2.
- Containers back up their data, which is always contained in their directory by convention. They are also another copy of the Docker Git repository.
B2 Cloud Points
- When first creating a new bucket, it needs to be initialized with Restic by running
restic init.
Example:
restic -r b2:Pukeko-XYZ-Cloud init{.info}
The password is read from the
RESTIC_PASSWORDenvironment variable set in thezprofile. It is also stored in the BitWarden password manager. {.warning}
- Bucket names are globally unique and cannot be changed once created (as far as I'm aware).
- When creating a new bucket, set it to be as basic as possible - no object locks, no encryption, no snapshots - Restic handles all of these things.
Local Backups
Local backups are done using Syncthing, a decenteralized sync engine. Syncthing provides encrypted, delta-aware backups, and is very granular - what is uploaded and where is set by each client. Sync can also be configured as single direction (send-only or receive-only).
By convention, every backup is placed under /Red-Vol/Media/Cloud/Syncthing/[user].