• 1 Post
  • 32 Comments
Joined 2 years ago
cake
Cake day: June 3rd, 2023

help-circle
  • I’ve finally pinned down my backup automaton:

    • All my services are in podman containers/pods managed by systemd.
    • All services are PartOf= a custom containers.target.
    • All data is stored on btrfs sub volumes
    • I created a systemd service that Conflicts=containers.target for creating read only snapshots of the relevant subvolumes.
    • That service Wants=borgmatic.service wich creates a borg backup of the snapshots on a removable drive. It also starts containers.target on success or failure since the containers are not required to be stopped anymore.
    • After borg backup is done, the repository gets rclone synced to an S3 compatible storage.
    • This happens daily, though I might put the sync to S3 on a different schedule, depending how much bandwidth subsequent syncs will consume.

    What I’m not super happy about is the starting of containers.target via the systemd unit’s OnSuccess= 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).


  • What I’m reading is that you want site-to-site connectivity. Wireguard + possibly dynamic DNS makes this pretty easy (assuming you can open ports and configure NAT at your sites). Or you could set up some other VPN solution like OpenVPN.

    There’s also tailscale (a paid service) for facilitating the wireguard setup, NAT traversal and relaying. headscale is a self hosted solution that aims to provide something similar (but more limited in scope).




  • I’m also using caddy with desec.io. When first triggering the challenge for an entry, it can fail a couple of times. I think it just takes a while for the DNS entry to be available.

    Another thing that I’ve experienced is that I can’t use wildcard subdomain entries. My guess is that it’s somehow because I only have public IPv6 addresses (but I don’t remember the details). I have configured an internal DNS with the wildcard entry since I’m only ever connecting to that host via wireguard from outside my network. For the host itself I’ve created a regular AAAA record.