Refactor mysqlbackupdir