stack/erp5: Fix restore-from-backup script
The `restore-from-backup` script starts by deleting existing data from `srv/mariadb` before starting mariadb and importing backups. Before this commit, it would only delete the contents of `srv/mariadb` and crash if this directory did not exist. But the mariadb service only reinitialises `srv/mariadb` if it does not exist when the service starts, and instead crashes if it exists but is merely empty. So the `restore-from-backup` script must actually delete the whole directory and not just it's contents, and it must not crash if the directory already does not exists.
Showing
Please register or sign in to comment