Closed jsmatias closed 7 months ago
Hi,
I left some feedback. Overall it looks good. Unfortunately, I couldn't test this that well, it seems that
tar
on macos does not do incremental backups :/ And this does worry me, since it seems that you didn't run this either? Because a critical part of themysql_restore
call is missing (the docker container name).I can test this in a linux environment later, but figured I will send this feedback already.
Indeed, tar
on MacOS doesn't have incremental backups. But I installed GNU tar
to to run it locally.
In fact, the docker container name was missing! Thanks for spotting that.
What happened is that when I was testing it, I ran the command just once directly from terminal and when I passed the commands to the script I forgot the container's name. I ended up not testing it again, because the process to restore the entire DB takes some time.
I cleaned up the DB to make it quicker and tested it properly this time.
This backup system is designed to run within a Docker container using Cron jobs to schedule regular executions.
In summary, it includes:
Dockerized Backup Solution: Encapsulates the backup logic within a Docker container.
Cron Job Scheduling: Utilises cron for scheduling backups at regular intervals. This approach provides flexibility in how frequently backups are performed, and for which service (MySQL, Keycloak, connectors, etc).
Incremental Backups: It uses incremental backup logic implemented in cycles. Each cycle contains a full backup followed by incremental ones. Currently, it is set to run daily in weekly cycles.
Restoring procedure: The restore.sh script is available to be run manually if any file needs to be restored.