#!/usr/bin/env bash

podman exec -i {{ item.container }} mysqldump \
    -u {{ item.mysql_user }} \
    -p{{ item.mysql_password }} \
    {{ item.database }} |
    /usr/bin/gzip --rsyncable |
    /usr/local/bin/restic backup --stdin --stdin-filename {{ item.name }}.sql.gz
