In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to back up MySQL incrementally". Friends who are interested might as well take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "MySQL how to incremental backup" it!
It would be nice to add automatic tasks to execute every hour or less.
#! / bin/sh#author RuM#date 2015-07-10BAKDIR=/tmp/mysqlbakBAKDIR_FULL=$BAKDIR/fullBAKDIR_ADD=$BAKDIR/addCONF=/etc/my.cnfpasswd=123456INNOBACKUPEX=/usr/bin/innobackupex
The first execution will make a full and additional backup, and the subsequent execution will be an incremental backup.
If [- f "$INNOBACKUPEX"] then if [- d "$BAKDIR"] then echo "is ok" else mkdir $BAKDIR_FULL-p mkdir $BAKDIR_ADD-p fi
Fully prepared
Files= `ls $BAKDIR_ FULL` if [- z "$files"] then $INNOBACKUPEX-defaults-file=$CONF-user=root-password=$PASSWD $BAKDIR_FULL FULLNAME=$ (dir "$BAKDIR_FULL") $INNOBACKUPEX-defaults-file=$CONF-user=root-password=$PASSWD-incremental-basedir=$BAKDIR_FULL/$FULLNAME/-incremental $BAKDIR_ADD else
Incremental backup
ADDNAME=$ (ls-lt $BAKDIR_ADD | sed-n 2p | awk'{print $9}') $INNOBACKUPEX-- defaults-file=$CONF-- user=root-- password=$PASSWD-- incremental-basedir=$BAKDIR_ADD/$ADDNAME/-- incremental $BAKDIR_ADD fi else echo "is not install innobackupex" fi so far, I believe you have a deeper understanding of "how MySQL incremental backup", might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.