diff --git a/backup.sh b/backup.sh index 7721b8e..6841dc1 100755 --- a/backup.sh +++ b/backup.sh @@ -16,7 +16,7 @@ # backup mysql dbFile="${backupDir}/db/${currentDate}.sql" -docker exec $(docker container ls -qf name=nextcloud-database) sh -c 'mysqldump --single-transaction=TRUE --lock-tables --default-character-set=utf8mb4 -uroot -p"${MYSQL_ROOT_PASSWORD}" ${MYSQL_DATABASE}' > ${dbFile} +docker exec $(docker container ls -qf name=nextcloud_database) sh -c 'mysqldump --single-transaction=TRUE --lock-tables --default-character-set=utf8mb4 -uroot -p"${MYSQL_ROOT_PASSWORD}" ${MYSQL_DATABASE}' > ${dbFile} sed -i "/^mysqldump: \\[Warning\\]/d" ${dbFile} tar -cj ${dbFile} -f "${dbFile}.tbz2" rm ${dbFile}