真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

mariabackup增量備份還原-創(chuàng)新互聯(lián)

1、全備和增量過程命令

創(chuàng)新互聯(lián)是工信部頒發(fā)資質(zhì)IDC服務(wù)器商,為用戶提供優(yōu)質(zhì)的南充服務(wù)器托管服務(wù)??mariabackup?--backup????--target-dir=/var/mariadb/backup/????--user=root?--password= ??mariabackup?--backup????--target-dir=/var/mariadb/inc1/????--incremental-basedir=/var/mariadb/backup/????--user=root?--password= ??mariabackup?--backup?--history???--target-dir=/var/mariadb/inc2/????--incremental-basedir=/var/mariadb/inc1????--user=root?--password= ??mariabackup?--backup?--history???--target-dir=/var/mariadb/inc3/????--incremental-basedir=/var/mariadb/inc2????--user=root?--password=

2、恢復(fù)過程

??mariabackup?--prepare?--target-dir=/var/mariadb/backup ??mariabackup?--prepare????--target-dir=/var/mariadb/backup????--incremental-dir=/var/mariadb/inc1 ??mariabackup?--prepare????--target-dir=/var/mariadb/backup????--incremental-dir=/var/mariadb/inc2 ??mariabackup?--prepare????--target-dir=/var/mariadb/backup????--incremental-dir=/var/mariadb/inc3 ??/etc/init.d/mysql?stop ??mariabackup?--copy-back????--target-dir=/var/mariadb/backup/ ?? ??/etc/init.d/mysql?start

3、特別說明

MariaDB10.2.7以后不再支持使用Percona?XtraBackup工具在線物理熱備份,所以就自己copy一個類似工具

4、準(zhǔn)備備份版本差異

MariaDB?starting?with?10.2?使用 mariabackup?--prepare?\ ???--target-dir=/var/mariadb/backup MariaDB?until?10.1?使用 $?mariabackup?--prepare?--apply-log-only?\ ???--target-dir=/var/mariadb/backup

5、每周一次全量,其余增量腳本

#!/bin/bash LOCALDIR=/data/mysqlbak WEEKDAY=`date?+%u` INTERVARNUM=`expr?$WEEKDAY?-?1` TISHWEEKFULL=`date?-d?"$INTERVARNUM?day?ago"?+%F` YESTERDAY=`date?-d?"1?day?ago"?+%F` TODAY=`date?+%F` FULL=/$LOCALDIR/$TISHWEEKFULL/full INCR=/$LOCALDIR/$TISHWEEKFULL/incr/$TODAY YESTERDAYDIR=/$LOCALDIR/$TISHWEEKFULL/incr/$YESTERDAY if?[?!?-d?$FULL?]?;then echo?"沒有l(wèi)sn信息,開始一次全備" ?????mkdir?-p?$FULL ?????/usr/bin/mariabackup?--backup?--slave-info?--kill-long-queries-timeout=120?--kill-long-query-type=select??--target-dir=$FULL/ exit?0 fi mkdir?-p?$INCR if?[?!?-d?$YESTERDAYDIR?]??;then ?/usr/bin/mariabackup?--backup????--slave-info?--kill-long-queries-timeout=120?--kill-long-query-type=select?????????--target-dir=$INCR/??--incremental-basedir=$FULL exit?0 fi ?/usr/bin/mariabackup?--backup????--slave-info?--kill-long-queries-timeout=120?--kill-long-query-type=select?????????--target-dir=$INCR/??--incremental-basedir=$YESTERDAYDIR

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。


當(dāng)前文章:mariabackup增量備份還原-創(chuàng)新互聯(lián)
URL標(biāo)題:http://weahome.cn/article/gepge.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部