增量式备份
This commit is contained in:
parent
b329a8fe53
commit
6f42021a3c
@ -33,7 +33,7 @@ cd $backUpPath
|
|||||||
#if [ -z "$LAST_BINLOG" ]; then
|
#if [ -z "$LAST_BINLOG" ]; then
|
||||||
# mysqldump -u $MYSQL_USER -p$MYSQL_PASSWORD -h $MYSQL_HOST $MYSQL_DATABASE > "$BACKUP_DIR/full_backup.sql"
|
# mysqldump -u $MYSQL_USER -p$MYSQL_PASSWORD -h $MYSQL_HOST $MYSQL_DATABASE > "$BACKUP_DIR/full_backup.sql"
|
||||||
#else
|
#else
|
||||||
echo "docker exec maria /usr/bin/mysqlbinlog -u"${userName}" -p"${password}" -h"${host}" --start-position="${LAST_BINLOG}" --stop-position="${CURRENT_POSITION}" --result-file='"${backUpPath}"/"${dbName}"-"${currentTime}".sql' "${LAST_BINLOG}
|
echo "docker exec maria /usr/bin/mysqlbinlog -u"${userName}" -p"${password}" -h"${host}" --start-position="${LAST_BINLOG}" --stop-position="${CURRENT_POSITION}" > "${backUpPath}"/"${dbName}"-"${currentTime}".sql"
|
||||||
docker exec maria /usr/bin/mysqlbinlog -u${userName} -p${password} -h${host} --start-position=${LAST_BINLOG} --stop-position=${CURRENT_POSITION} $LAST_BINLOG > ${backUpPath}/${dbName}-${currentTime}.sql
|
docker exec maria /usr/bin/mysqlbinlog -u${userName} -p${password} -h${host} --start-position=${LAST_BINLOG} --stop-position=${CURRENT_POSITION} $LAST_BINLOG > ${backUpPath}/${dbName}-${currentTime}.sql
|
||||||
#fi
|
#fi
|
||||||
# 更新上次备份的binlog文件名和位置
|
# 更新上次备份的binlog文件名和位置
|
||||||
|
Loading…
x
Reference in New Issue
Block a user