So I’ve been self-hosting for a few years now…got a decent setup…
But I only really got into docker-compose in the last few months… I mean, I’ve used it through the “Apps” in TureNAS, but never directly…
I ran a mastodon host on a VM (giant pain in the ass) and a few other things that weren’t available as apps, but never mainstream…
Once I got into it, I managed to get everything moved over to truenas as docker containers…
Last week it saved my ass…the AC in the house failed…and I was able to shut down everything save the Truenas (with a fan pointed at the front of the server) and keep everything up and running throughout…
So it’s been helpful to know, and an awesome learning experience. (I’m happiest when I’m learning new things)
My question is this…
How do you back them up? I mean, I have snapshot backups of my docker-volume ZFS dataset, and replicate that to a remote host…but I’m not even sure I’d know how to recover it if I had to…is it just a file copy and restart?


I have a directory in my home folder for all my different docker containers. I back that up like my other critical files on my NAS, Backup NAS, cloud storage and external drive. Its all scripted to happen periodically.
The docker compose files I also upload to my local Git so I can version them. Make the git ignore skip everything that isn’t a .yml
If you would want to spin them up again, yeah you could just copy them in a new place, make sure the docker-compose.yml is at the top and docker-compose pull the image, then docker-compose up. If your yml specifies that your configs are ./ , it’ll know to look for them in the same folder as your yml and begin its file paths there. Anything outside your ./ in theory should be read only or be some kind of data off a NAS that is independent from the service. Its just not best practice in my eyes for your docker application to write outside of the folders beneath its docker-compose.yml location.
Just organize your volumes correctly and you can move the docker container anywhere you want with a copy paste and a docker-compose up. Imo docker-compose is WAY easier and faster than any GUI instance of Docker.
So I have filesystem backups of the entire thing (using proxmox backup server) and a replicated image of the docker-volume and all subvolumes that’s both snapped locally and replicated to a NAS at my condo about 200 miles away.
I think I’m covered. I even tried brinigng up the server on the Truenas there and it worked like a champ…All I ahve to do is fail my cloudflared over and everything would automatically come up on the remote location without me even having to muck about with DNS.
I don’t mess with Git…I should…but that’s a new set of lessons. :)