passbolt / lab-passbolt-ansible-collection

Source repository for https://galaxy.ansible.com/anatomicjc/passbolt
MIT No Attribution
9 stars 10 forks source link

Feature request: Add (configurable?) number of retries on fail or timeout #17

Open RobinR1 opened 6 months ago

RobinR1 commented 6 months ago

Once every hour we take an automated backup of the passbolt DB and keys. However this makes passbolt unresponsive or at least very slow during about 1 to 2 minutes.. But since we also run a lot of Ansible plays, with many lookups, it happens quite a lot that we get a timeout error from the lookup plugin at the times such a backup occurs.

So I would like to see the plugin to retry a few times before actually bailing out.

AnatomicJC commented 6 months ago

Hi,

How are you handle the backup of your database ?

If using MariaDB and mysqldump, you should consider mariabackup.

nysqldump freezes the database during backup as mariabackup shouldn't: https://mariadb.com/kb/en/full-backup-and-restore-with-mariabackup/

Cheers,

AnatomicJC commented 6 months ago

Another approach should be to configure a master-slave and perform the backup on the salve instance.

RobinR1 commented 6 months ago

If using MariaDB and mysqldump, you should consider mariabackup.

we are using mariadb but the backup is done using the cake passbolt mysql_export command. Not sure what method that uses to perform the export.

Another approach should be to configure a master-slave and perform the backup on the salve instance.

that has been added to my wish list now .. :-)

AnatomicJC commented 6 months ago

The cake passbolt mysql_export uses mysqldump, that's why you have a freeze of your environment.

You should consider mariabackup

This tool provides a production-quality, nearly non-blocking method for performing full backups on running systems.

Backup / restore operations: https://mariadb.com/kb/en/full-backup-and-restore-with-mariabackup/