差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版 前次修改 下次修改 | 前次修改 | ||
| tech:automysqlbackup [2018/02/26 19:07] – [修改與設定] Jonathan Tsai | tech:automysqlbackup [2018/04/20 09:05] (目前版本) – [參考網址] Jonathan Tsai | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | ====== 安裝與設定 AutoMySQLBackup ====== | ||
| + | * 安裝環境 : CentOS 6.9 x86_64 | ||
| + | * 安裝版本 : automysqlbackup-v3.0_rc6 | ||
| + | |||
| + | ===== 下載與安裝 ===== | ||
| + | * <code sh> | ||
| + | su - root | ||
| + | mkdir -p source/ | ||
| + | cd source/ | ||
| + | wget https:// | ||
| + | tar -zxvf automysqlbackup-v3.0_rc6.tar.gz | ||
| + | ./ | ||
| + | </ | ||
| + | * 如果都採用預設值, | ||
| + | |||
| + | ===== 修改與設定 ===== | ||
| + | * 更改 / | ||
| + | : | ||
| + | CONFIG_mysql_dump_username=' | ||
| + | |||
| + | CONFIG_mysql_dump_password=' | ||
| + | |||
| + | CONFIG_mysql_dump_host=' | ||
| + | |||
| + | CONFIG_backup_dir='/ | ||
| + | |||
| + | : | ||
| + | </ | ||
| + | * 第一次手動執行 <code sh> | ||
| + | automysqlbackup / | ||
| + | </ | ||
| + | * 設定每天自動執行 <code sh> | ||
| + | vi / | ||
| + | </ | ||
| + | #!/bin/sh | ||
| + | |||
| + | / | ||
| + | |||
| + | chown root.root / | ||
| + | find / | ||
| + | find / | ||
| + | </ | ||
| + | chmod a+x / | ||
| + | service crond restart | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== 出現的警告與異常訊息解法 ===== | ||
| + | ==== 1. WARNING: Turning off multicore support, since pigz isn't there. ==== | ||
| + | * 安裝 pigz 來解決 <code sh> | ||
| + | yum install pigz | ||
| + | </ | ||
| + | |||
| + | ==== 2.mysqldump: | ||
| + | * 參數檔內的 CONFIG_mysql_dump_single_transaction 設為' | ||
| + | : | ||
| + | # While a --single-transaction dump is in process, to ensure a valid dump file (correct table contents and | ||
| + | # binary log coordinates), | ||
| + | # DROP TABLE, RENAME TABLE, TRUNCATE TABLE. A consistent read is not isolated from those statements, so use of | ||
| + | # them on a table to be dumped can cause the SELECT that is performed by mysqldump to retrieve the table | ||
| + | # contents to obtain incorrect contents or fail. | ||
| + | CONFIG_mysql_dump_single_transaction=' | ||
| + | |||
| + | # http:// | ||
| + | : | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== 參考網址 ===== | ||
| + | * https:// | ||
| + | * http:// | ||
| + | * https:// | ||
| + | |||
| + | {{tag> | ||