• Xavier Thompson's avatar
    stack/erp5: Fix restore-from-backup script · 93cc61cb
    Xavier Thompson authored
    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.
    93cc61cb
instance-mariadb-resiliency-after-import-script.sh.in 2.14 KB