Xtrbackup 備份過程報錯 Error: option 'datadir' has different values:
在給一個新庫做備份的時候,遇到了問題,具體報錯如下:
備份指令碼執行過程如下:
分析師配置檔案中有錯誤,新增了datadir 選項,仍然會報錯,仔細檢查後發現是沒有新增【mysqld】標籤
[root@o-db all_2016-06-24]# cat /etc/my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[mysqld] -----------> 這裡是發生報錯的原因 沒有新增這個標籤 所以會爆出來有不同的值
datadir=/var/lib/mysql/
新增完成後,備份指令碼正常執行
160624 10:57:06 Connecting to MySQL server host: localhost, user: root, password: set, port: 0, socket: /var/lib/mysql/mysql.sock
Using server version 10.1.14-MariaDB
Error: option 'datadir' has different values:
'.' in defaults file
'/var/lib/mysql/' in SHOW VARIABLES
備份指令碼執行過程如下:
[root@o-db scripts]# sh -x bak.sh
++ which innobackupex
+ innobackupex=/usr/bin/innobackupex
++ which xtrabackup
+ xtrabackup=/usr/bin/xtrabackup
+ cnf=/etc/my.cnf
+ user=root
+ password=admin
+ backdir=/u01/backup
++ date +%F
+ /usr/bin/innobackupex --defaults-file=/etc/my.cnf --socket=/var/lib/mysql/mysql.sock --ibbackup=/usr/bin/xtrabackup --user=root --password=admin --no-timestamp /u01/backup/all_2016-06-23
160624 10:57:06 innobackupex: Starting the backup operation
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
160624 10:57:06 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;mysql_socket=/var/lib/mysql/mysql.sock' as 'root' (using password: YES).
160624 10:57:06 version_check Connected to MySQL server
160624 10:57:06 version_check Executing a version check against the server...
160624 10:57:06 version_check Done.
160624 10:57:06 Connecting to MySQL server host: localhost, user: root, password: set, port: 0, socket: /var/lib/mysql/mysql.sock
Using server version 10.1.14-MariaDB
Error: option 'datadir' has different values:
'.' in defaults file
'/var/lib/mysql/' in SHOW VARIABLES
++ date --date '1 days ago ' +%Y-%m-%d
+ rm -rf /u01/backup/all_2016-06-23
分析師配置檔案中有錯誤,新增了datadir 選項,仍然會報錯,仔細檢查後發現是沒有新增【mysqld】標籤
[root@o-db all_2016-06-24]# cat /etc/my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[mysqld] -----------> 這裡是發生報錯的原因 沒有新增這個標籤 所以會爆出來有不同的值
datadir=/var/lib/mysql/
新增完成後,備份指令碼正常執行
xtrabackup: Stopping log copying thread.
.160624 11:09:00 >> log scanned up to (33566075)
160624 11:09:00 Executing UNLOCK TABLES
160624 11:09:00 All tables unlocked
160624 11:09:00 Backup created in directory '/u01/backup/all_2016-06-24'
160624 11:09:00 [00] Writing backup-my.cnf
160624 11:09:00 [00] ...done
160624 11:09:00 [00] Writing xtrabackup_info
160624 11:09:00 [00] ...done
xtrabackup: Transaction log of lsn (33566075) to (33566075) was copied.
160624 11:09:00 completed OK!
++ date --date '1 days ago ' +%Y-%m-%d
+ rm -rf /u01/backup/all_2016-06-23
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29291882/viewspace-2120930/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Xtrabackup恢復時報錯'Error: datadir must be specified'Error
- MySQL冷備份過程MySql
- 建立xtrbackup備份使用者 ERROR 1819 (HY000): Your password does not satisfy the current policy requirementsErrorUIREM
- rsync 守護程式備份報錯
- mysql5.6 mysqldump備份報錯MySql
- sap brtools發起oracle備份失敗,tsm備份軟體備份報錯Oracle
- innobackupex命令備份全過程圖解圖解
- SQL Server 資料備份儲存過程SQLServer儲存過程
- Oracle9i RAC 報 /nsr/res/nsrdb save: RAP error: system error錯誤分析及解決過程(OracleError
- MySQL 建立儲存過程報錯MySql儲存過程
- Xtrabackup備份報錯Failed to connect to MySQL serverAIMySqlServer
- MYSQL5.7.22全庫備份匯入MYSQL8.0.20報錯ERROR3554MySqlError
- MongoDB 備份恢復啟動後執行操作報錯:Error:couldn't add user:not masterMongoDBErrorAST
- mysqldump與innobackupex備份過程你知多少(一)MySql
- mysqldump與innobackupex備份過程你知多少(二)MySql
- mysqldump與innobackupex備份過程你知多少(三)MySql
- 通過備份初始化合並複製時的報錯的解決
- 查詢儲存過程報錯資訊儲存過程
- Myeclipse 錯誤An internal error has occurred 解決辦法EclipseError
- Oracle RMAN 備份控制檔案報錯問題Oracle
- vipca報錯 Error 0PCAError
- 專案使用guzzleHttp報錯:certificate has expiredHTTP
- MySQL Insert資料量過大導致報錯 MySQL server has gone awayMySqlServerGo
- VUE—刪除HelloWorld.vue後報錯 `--fix` option報錯的解決Vue
- jdbc使用call呼叫儲存過程報錯JDBC儲存過程
- 啟動UltraEdit錯誤An error has occured.The application will be shutdown.ErrorAPP
- Oracle9i RAC 報 /nsr/res/nsrdb save: RAP error: system error錯誤分析及解決過程(僅供參考)OracleError
- pl/sql developer除錯儲存過程報錯處理SQLDeveloper除錯儲存過程
- RAC環境的STANDBY資料庫備份報錯資料庫
- ERROR 1045 (28000): ProxySQL Error: 報錯ErrorSQL
- TSM ORACLE 備份排程Oracle
- mysqldump與innobackupex備份過程你知多少(完結篇)MySql
- An out of memory error has occurred.Error
- MYSQL SOURCE報錯 ERROR: ASCIIMySqlErrorASCII
- electron專案npm i 報錯certificate has expiredNPM
- MySQL過程報 Parameter number N is not an OUT parameter錯誤MySql
- 安裝sysbench過程報錯,解決辦法
- 只存在RMAN備份片的資料庫恢復過程資料庫