mysql全备份与增量备份

本文详细介绍了MySQL增量备份的实现步骤,包括创建备份目录、编写备份脚本、配置my.cnf以开启日志文件、设置定时任务及恢复流程,确保数据库数据的安全性和可靠性。

                         MySQL增量备份

1.创建一个文件夹用于存放mysql备份文件

  例如:mkdir  mysqldata

2.在创建脚本文件,用于备份数据库

   例:sudo vi /usr/sbin/bakmysql

文件内容为:

rq=`date "+%Y%m%d"`

mysqldump   -uroot -pepimap.123456 epimap --single-transaction --flush-logs --master-data=2> /mysqldata/epimap$rq.sql

备份文件以epimap+当前日期命名

3.修改my.cnf中开启日志文件

 log_bin                 = mysql-bin

expire_logs_days        = 10(日志保留十天)

binlog_do_db            = epimap(数据库名)

4.增加定时备份

 Sudo vi  /etc/crontab

添加定时执行脚本:

06 13   * * 6   root     /usr/sbin/bakmysql

每周六 13:06执行/usr/sbin/bakmysql文件

5.备份执行完毕后,查看备份文件会有:

 

这两个值时在恢复日志文件中会使用的

可以再/var/lib/mysql查看日志文件

6.当数据一不小心清空时就可以按照完全备份文件和日志文件进行恢复

 恢复完全备份文件:

mysql -uroot -pepimap.123456 epimap </mysqldata/epimap20140626.sql

再恢复日志文件:

mysqlbinlog --no-defaults mysql-bin.000085  --start-position=107 --stop-datetime='2014-06-26 12:00:00' |mysql -uroot -pepimap.123456; (恢复到数据清空前时间)

 

  

Coarse-Grained Reconfigurable Architectures (CGRAs) are an at- tractive platform that promise simultaneous high-performance and high power-efficiency. One of the primary challenges in using CGRAs is to develop efficient compilers that can automatically and efficiently map applications to the CGRA. To this end, this paper makes several contributions: i) Using Re-computation for Resource Limitations: For the first time in CGRA compilers, we propose the use of re-computation as a solution for resource limita- tion problem. This extends the solutions space, and enables better mappings, ii) General Problem Formulation: A precise and gen- eral formulation of the application mapping problem on a CGRA is presented, and its computational complexity is established. iii) Ex- tracting an Efficient Heuristic: Using the insights from the problem formulation, we design an effective global heuristic called EPIMap. EPIMap transforms the input specification (a directed graph) to an Epimorphic equivalent graph that satisfies the necessary conditions for mapping on to a CGRA, reducing the search space. Experi- mental results on 14 important kernels extracted from well known benchmark programs show that using EPIMap can improve the per- formance of the kernels on CGRA by more than 2.8X on average, as compared to one of the best existing mapping algorithm, EMS. EPIMap was able to achieve the theoretical best performance for 9 out of 14 benchmarks, while EMS could not achieve the theoreti- cal best performance for any of the benchmarks. EPIMap achieves better mappings at acceptable increase in the compilation time.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值