Is Duplicacy able to stop containers or database servers

I wanted to try out Duplicacy to make backups of my docker containers (among other things).
I run postressql and mariadb as containers.
How will Duplicacy handle that?
In my head it seems logical that those containers will be stopped before running the backup to avoid corrupt files.
Or even better; run scripts directly in the containers to make use of the database servers own backup tools

Welcome to the forum!

Duplicacy supports pre-command and post-command scripts. There you can do whatever you need, like grab filesystem snapshot, start/stop containers, or export the data (the preferred method to backup running databases).

As a DBA: sure, you can stop your container and back up the volumes. For a database, however, I have a strong preference for actual database backups instead of image copies.

MariaDB 10 (which you’re probably running) should be reasonably close to MySQL 8, and if you can use util.dumpInstance() from the mysql shell (mysqlsh executable, not regular client) that will dump parallellized, chunk your tables and all that goodness. The benefit being that instead of restoring the whole thing, you can restore an individual schema or, if you’re so inclined, actually pick individual rows - util.dumpInstance() basically makes CSV files of your tables.

I’m not too familiar with PG, but I suppose they have some similar backup tool that can make consistent snapshots of your data.

Thank you for your answers.
I run Duplicacy as a docker container in Unraid, so I’m not sure if it’s possible for a container (Duplicacy) to actually stop other containers.
But on the other hand, so can Portainer, so why not Duplicacy?

I run both MariaDB and Postgres, since the myriad of containers demands both
I have made a script that backs up all my Postgres databases, that I was planning to run from a shared folder that the actual containers (Duplicacy and Postgres) can reach.
Must find a similiar script for MariaDB then I guess.

And actually test that this works, lul

Yes, of course. You would need to pass the pid of docker engine to the container, just like you do with portrainer.

However I woudl follow @vegivamp 's advice above and use database tools to export it for backup.

Any guide on how to do this? Surely I’m not the only one wondering about this :slight_smile:

Yes, I have created a script for PostgreSQL that backs up all databases and users.
Still need something similar for MariaDB
And still need to backup the folder where the backups are created