There was an error on the backup - workaround

Out of nowhere i got an error during the backup procedure “There was an error on the backup”.
i did a workaround using copilot that suggested that the problem was the size of the database. It helped built this script that i use either from Ubuntu cmd or using Cron every night. The procedure is smooth but i did not try a restore to check yet. i am not a developer, no programming skills, cannot tell if it is good for all even for myself! no guarantee of course:)

openemr-restore.sh (3.3 KB)

openemr-backup.sh (1.9 KB)

@eumetaxas I would strongly recommend using another form of backup. Those backup scripts are not the best options for backing up the program and data. Those scripts were written at a time when the program was really small, before the program reached over a million lines of code, and when the database was under 125 tables. Relying on those scripts now can border on being reckless. You should be backing up the entire machine. It would be far better to be creating a machine image daily rather than just a data dump.