• 0 Posts
  • 7 Comments
Joined 1 year ago
cake
Cake day: June 25th, 2024

help-circle
  • btrbk ... && curl https://uptime.my.domain/api/push/... is exactly what I do in a systemd service with nightly timer. Uptime Kuma sends a matrix message (via a bot account on matrix.org) if it doesn’t get a success notification in 25h. I have two servers in different locations that do mutual backups and mutual uptime kuma monitoring. Should both servers go down at the same time, there’s also some basic and free healthcheck from my dynamic-ipv6 provider https://ipv64.net/, so I also get an email if any of the two uptime kumas cannot be reached anymore.


  • You need to ask yourself what properties you want in your storage, then you can judge which solution fits. For me it is:

    • effortless rollback (i.e. in case something with a db updates, does a db migration and fails)
    • effortless backups, that preserve database integrity without slow/cumbersome/downtime-inducing crutches like sql dump
    • a scheme that works the same way for every service I host, no tailored solutions for individual services/containers
    • low maintenance

    The amount of data I’m handling fits on larger harddrives (so I don’t need pools), but I don’t want to waste storage space. And my homeserver is not my learn and break stuff environment anymore, but rather just needs to work.

    I went with btrfs raid 1, every service is in its own subvolume. The containers are precisely referenced by their digest-hashes, which gets snapshotted together with all persistent data. So every snapshot holds exactly the amount of data that is required to do a seamless rollback. Snapper maintains a timeline of snapshots for every service. Updating is semi-automated where it does snapshot -> update digest hash from container tags -> pull new images -> restart service. Nightly offsite backups happen with btrbk, which mirrors snapshots in an incremental fashion on another offsite server with btrfs.