线上一个小业务的mysql备份 全量备份 #!/bin/bash #crete by hexm at -- #scripte name : full_backup.sh #descriptioni : mysql full backup. oneday at a time. #time info date=`date +%Y%m%d` #time_now1=`date +%Y%m%d-%H:%M:%S` #dir info BACKUP_DIR="/app/dbbackup/full_backu…
全量备份: # vim /root/DBFullyBak.sh //添加以下内容 #!/bin/bash # Program # use mysqldump to Fully backup mysql data per week! # History # 2013-04-27 guo first # Path # 全备份:/home/mysql/backup # 增量备份目录:/home/mysql/backup/daily BakDir=/home/mysql/backup Date=`dat…
mysql的全量备份与增量备份 全量备份:可以使用mysqldump直接备份整个库或者是备份其中某一个库或者一个库中的某个表. 备份所有数据库:[root@my ~]# mysqldump -uroot -p123456 --all-databases >/opt/all.sqlmysqldump: [Warning] Using a password on the command line interface can be insecure. 备份单个数据库的所有表:[root@my ~]#…