Content Engine is a nickname I've given to a set of services, run inside of Docker containers through Docker Compose, that runs services predicated on serving media up for private use in a self-hosted manner.
This is a brief description of the update and backup strategy that I use for the containers and their data.
This file updates the containers, keeping an explicit log of its activities and also using logger
to print things to my local syslog. I'll include a sample of the logfile output at the end of the gist.
This script backs up the contents of /srv, which is where my main application storage is mounted. Everything that is custom to this server's setup is ultimately symlinked back into this mount point, such that backing it up serves as a catch-all for any hard-to-replace data. The backup process also produces a special log file with rsync stats, as well as using logger
.
This should be a systemd timer, but I hadn't spent the time to learn how to configure those properly when I initially set this up, and have no desire to reconfigure it :P
This is included just to show how I invoke these scripts to actually get work done and create the log files.
Sanoid is a tool that automates the process of ZFS snapshot management. I use it to implement version control of my backups. I'll include some of the log output from that as well just for the sake of completeness.
This whole thing was an exercise in "classic Linux systems adminitration" for me. I'm used to doing everything in a very heavily-repeatable and generic way with respect to systems management (chef, terraform, etc), but for this particular implementation I didn't want to do that, yet still wanted to see what I came up with. In the end, doing some level of documentation on the build was basically unavoidable because it drives me nuts to not have that otherwise. This has been a fun, if ever-changing project. I'll probably be tweaking it forever.