this post was submitted on 01 Nov 2025
27 points (100.0% liked)
Self-hosting
3816 readers
2 users here now
Hosting your own services. Preferably at home and on low-power or shared hardware.
Also check out:
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I've finally pinned down my backup automaton:
PartOf=a customcontainers.target.Conflicts=containers.targetfor creating read only snapshots of the relevant subvolumes.Wants=borgmatic.servicewich creates a borg backup of the snapshots on a removable drive. It also startscontainers.targeton success or failure since the containers are not required to be stopped anymore.rclone synced to an S3 compatible storage.What I'm not super happy about is the starting of
containers.targetvia the systemd unit'sOnSuccess=mechanism but I couldn't find an elegant way of stopping the target while the snapshots were being created and then restarting the target through the other dependency mechanisms.I also realize it's a bit fragile, since subsequent backup steps are started even if previous steps fail. But in the worst case that should just lead to either no data being written (if the mount is missing) or backing up the same data twice (not a problem due to deduplication).