Yep, bind mount the data and config directories and back those up. You can test a backup by spinning up a new image with the data/config directories.
This is both easy and generally the recommended thing I’ve seen for many services.
The only thing that could cause issues is breaking changes caused by the docker images themselves, but that’s an issue regardless of backup strategy.
ChapulinColorado@lemmy.world 9 months ago
After getting a NAS to replace my raspberry pi 4 as a home server, I literally just SCPd the bind mounts and docker compose folder, adjusted a few env variables (and found out of a few I needed to add for things like the uid/guid the NAS used as default for the media user I created) and it took maybe 30 minutes total to be back and running. Highly agree with you from experience.
catloaf@lemm.ee 9 months ago
Yup, it works great. I actually did it myself when migrating from a centos to debian host. Worked first try, no issues (except one thing that was already broken but I didn’t know because I hadn’t accessed it recently). Containers are great for this.