libraries, add build-up statements and
use statements--compact Remove comments, suitable for debug output, production without-
f flush Binlog log
-- Master-data Add binlog log file name level corresponding location point-
R backup stored procedure such as-
x Lock table-
l--lock-tables read-only lock table-
D only Back table structure-
t Back up data only--single-transaction for innodb Things database back
ZZ http://www.cnblogs.com/coffee_cn/archive/2010/03/26/1697038.html
Set in Cron, perform every Monday 2 o'clock in the morning (full backup every Monday, incremental backup for the rest of the time) #vi backup.sh
#!/bin/bash
# define
dayofweek= ' date ' +%u ' today= '
date
' +%y%m%d ' source=/data/ backup/
#
first, using the system's own tools to achieve full backup:mysqldump1. Back Up all databases:mysqldump-hlocalhost-uroot-p12345678 --all-databases >/opt/$ (Date +%f). SQL//--all-databases--All database /opt/$ (date +%f). SQL redirection to a date-named file 2. Back up the specified database:mysqldump-hlocalhost-uroot-p12345678 db1 DB2 >/opt/$ (Date +%f). SQL3, Full recovery: first to ensure that the library exists, no first createdmysql-hlocalhost-uroot-p12345678 db88 4. Full recovery can also
.
RSYNC-VZRTOPG--progress--delete--password-file=/etc/rsyncd.secretes root@118.244.216.177::logs/data/lnmp
Note: The above command means to sync the files under this path (/USR/LOCAL/LNMP) of the server to the client's path (/DATA/LNMP).
To reverse, synchronize the client's files to the server, as follows:RSYNC-VZRTOPG--progress--delete--password-file=/etc/rsyncd.secretes/data/lnmp root@118.244.216.177::logs
3.
There have been written similar MySQL full volume and incremental backup scripts before, but it's too simple. Last night, I wrote an example for mysql5.7, a relatively more optimized one for the company's online servers.
Note: This script is only suitable for small databases, not for large databases. After all, logical backup way, the database is too large impor
Data backups are in the form of full backups, differential backups, and incremental backups, so what are the differences between these three types of backups, and how do you choose them in specific applications? This paper introduces these problems.
A brief introduction of backup method
1. Full backup
Backing up all selected folders does not depend on the file's
Rsync is an efficient remote data backup tool. The port number of this service is 873,
Is a non-independent service under Liunx, managed by the xinetd super service, instead of listening to port 873.
Advantages:
1. rsync can use ssh and ssl remote control to connect to a remote host for backup, depending on the sshd se
In the previous blog, I talked about using rsync to achieve data mirroring and backup, but to achieve real-time data backup, independent of rsync can not be achieved, this article describes how to achieve real-time data backup.
First, the advantages and disadvantages of
]/]# ls/ba Ckup/2017-11-04.tar.gz test.tar.gz2.3Saturday Package Special nameBecause the server needs to keep the Saturday package, you need to give the file a special name in order to differentiate it when you package the Saturday file.[[Email protected]/]# CD/ tar-zcvf/backup/$ (date +%f) _week6.tar.gz Etc/hostsetc/hosts[[email protected]/]# ls/backup/2017-11-04.tar.gz 2017-11-04_week6.tar.gz test.tar.gz2
Scenario Description: The recent need to implement a TG-level document under Windows, remote incremental backup to a distributed storage server, so the following design:1, using rsync, after the test found that the file is very time-consuming, difficult to quickly achieve incremental
Rsync+cront Building a data mirroring backup systemfor a more clear introduction rsync the use of server mode, here through an enterprise case, describes how to build a remote disaster recovery backup system. Case description an e-commerce enterprise has a portal site, The Web server operating system is Linux, website
Higher uptime due to faster restore time
features
Create Hot InnoDB backups without pausing your database
Make incremental backups of MySQL
Stream compressed MySQL backups to another server
Move tables between MySQL servers on-line
Create new MySQL Replication slaves easily
Backup MySQL without adding load to the server
No need to stop database for InnoD
Tags: xtrabackup mysql backup incremental backupXtrabackup is a MySQL database backup tool provided by Percona, an open source tool capable of hot and incremental backups of InnoDB and XTRADB databases, for MyISAM, only for Win Bei, and for MyISAM when using incremental back
monitoring scripts#vi/srv/rsync.shRsync.sh contents are as follows:#!/bin/bashsrc=/srv/test/#监视改文件路径, folder content changes trigger server data synchronizationDes=backup #客服端配置的模块 (customer service side will introduce)Host= "192.168.10.6" #同步到的IP地址, if multiple spaces are separated. For example: host= "192.168.10.6 192.168.10.7"/usr/local/bin/inotifywait-mrq--timefmt '%d/%m/%y%h:%m '--format '%T%w%f '-e modify,delete,create,attrib $SRC | While read
By default, rsync is installed in ubuntu. You can run the rsync-h command to check whether the tool is installed. If not, run the following command:
$ Aptitude install rsync
Install.Rsyncremote synchronize) is a remote data synchronization tool that can be used to synchronize files between local and remote hosts using the "Rs
Rsync is a data-mirroring backup tool for Linux systems, and--remote sync is visible from the name of the software. Rsync supports most Unix-like systems, which are well tested on Linux, Solaris, and BSD. The latest version of Rsync can be obtained from http://rsync.samba.org/rsync
The Rsync service is an efficient remote data backup tool with port number 873,is a non-independent service under the Liunx. Managed by XINETD Super service, instead of listening 873port.Strengths:1. Rsync is able to use SSH and SSL remote control to connect to a remote host for backup. Dependent sshd Service2, enables
Lab Environment:Backup server:192.168.160.101Node1 server:192.168.160.245Experimental purpose: Implement NODE1 scheduled incremental backups to backup serverAdd two domain name resolution via local Hosts file (two all to do) synchronize data via domain name more intuitive!Backup server:Ping test:Node1 Server:Ping test:Install
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.