diff --git a/backup.sh b/backup.sh index a06c1f6..c54f3b0 100755 --- a/backup.sh +++ b/backup.sh @@ -20,7 +20,8 @@ # backup mysql dbFile="${backupDir}/db/${currentDate}.sql" -docker-compose exec mysql-gitbucket sh -c 'exec mysqldump --lock-tables --default-character-set=utf8mb4 -uroot -p"${MYSQL_ROOT_PASSWORD}" ${GITBUCKET_DATABASE}' > ${dbFile} +docker-compose exec mysql-gitbucket sh -c 'exec mysqldump --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}