New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Migrating docker and backup strategy
I am currently running a few docker containers in my LAN and plan to migrate them to a VPS. I am worried about docker persistent data backups and what "recovery plan" I should do.
In my LAN - I have btrfs snapshots every hour of my docker data. On VPS I have to setup my own backup strategy - the docker container is TeslaMate which uses PostgreSQL.
One of the solutions I ran into that may help me set this up on a VPS seems to be Coolify https://coolify.io/docs/databases/backups
any other recommendations or suggestions? I also need to figure out a strategy for easy migration between VPS providers. I haven't found a solution for this....

Comments
This can be done pretty easily.
On your LAN (I assume you use docker-compose) you just need to export your volume.'
tar -cvf <volume_name>.tar -C /var/lib/docker/volumes/<volume_name>/_data .Copy to your VPS.
On your VPS:
tar -cvf <volume_name>.tar -C /var/lib/docker/volumes/<volume_name>/_data .Docker Compose should take care of networks etc.
Is it only the database data that you actually have to backup?
If so, I’d probably setup a backup container that simply runs a db dump, compresses and uploads somewhere, triggered by a cron from within this same container
Doesn't he need to stop the container first?