Alibabacloud.com offers a wide variety of articles about mysql backup shell script, easily find your mysql backup shell script information here online.
1. Write the backup and clear the old log Shell script:
Copy codeThe Code is as follows :#! /Bin/sh
# Backup eoslog
# Author rhao
# Date 2008-12-27
# Define Environment VariablesEOS_HOME =/home/eosSAS_HOME =/home/eos/SAS
# Test primary and secondary nodesIf test-d '/home/eos/SAS/sasw.web1'ThenSAS_LOG_HOME = $ SAS_HOME
Today, the company asked me to copy the backup files on the server to the internal server, and as long as they are up-to-date, well, what is the ideal goal of O M personnel, that is, what can be done by computers, never do it by yourself.System: centos 5.9Environment: The backup file is under/root/bak. Of course, I tested it on a virtual machine.1. Backup file e
#!/bin/bashcd= ' df-l |awk ' nr==3 {print $4} ' |awk ' BEGIN {fieldwidths= ' 2 1 "} ' {print '} 'If [$CD-ge 20];thenecho " hard disk space is full and cannot be backed up " | Mutt-s " backup alarm, please replace the hard drive in time " [Email protected] exit 1FiLogrotate-f/etc/logrotate.confTar zcf/opt/backup/' Date +%y%m%d%h%m '. tat.gz/var/log/messages.* >/dev/nullRt= ' echo $? 'If [$RT-eq 0];thenecho "
Tags: rman scripting shell1, the database is fully prepared to the hard disk[[Emailprotected]scripts]$catrman_backup.shsource/home/oracle/.bash_ profilermantarget/log=/home/oracle/backup/backupall_rman.log2. Incremental backup ScriptLevel 0 increments[[Emailprotected]scripts]$catrman_backup_level0.shsource/home/oracle /.bash_profilermantarget/log=/home/oracle/backup
Hot Standby shell script file mysql1 # cat mysqlbackup. sh #! /Usr/local/bin/fish # The backup policy is daily full backup # set the backup path variable set backupdir/usr/db/backup # generate the
Use shell scripts to regularly back up MySQL database bitsCN. comPhp
Data Backup is required for any online e-commerce site. Regardless of version updates or server migration, the importance of backup data is self-evident. Manual data backup not only consumes a lot of time a
Tags: rman scripting shell1, the database is fully prepared to the hard disk[[Emailprotected]scripts]$catrman_backup.shsource/home/oracle/.bash_ profilermantarget/log=/home/oracle/backup/backupall_rman.log2. Incremental backup ScriptLevel 0 increments[[Emailprotected]scripts]$catrman_backup_level0.shsource/home/oracle /.bash_profilermantarget/log=/home/oracle/backup
Tags: mysql scheduled backup script diary cutMost of the diary cutting and backup mechanisms are the same: The following is the Nginx diary cutting script#!/bin/bashLogPath = '/home/nginx/log 'Nglogs = '/opt/nginx/logsMkdir-p $logpath/$ (date +%y)/$ (date +%m)MV $nglogs/acce
Nginx diary cutting script and MySQL regular backup script
Most of the log cutting and backup mechanisms are the same: Below is the Nginx diary cutting script#! /Bin/bashLogpath = '/home/nginx/Log'Nglogs = '/opt/nginx/logsMkdir-p
install MySQL for you"
wgetHttps//repo.mysql.com//mysql57-community-release-el7-10.noarch.rpm--no-check-certificate
rpm-UVH mysql57-community-release-el7-Ten. noarch.rpmfi#安装系统Yum Installmysql-community-Server #启动服务 service mysqld start #查看临时密码文件grep 'Temporary password'/var/log/mysqld.log Rehat backup MySQL Script1. The code is as follows: #!/bin/Bash #保存备份个
In linux, the mysql automatic backup script code bitsCN.com is stored in/home/user/mysql_backup.sh.
Crontab
# Crontab-l
# M h dom mon dow command
28 16 ***/home/user/mysql_backup.sh
The script is as follows:
#! /Bin/sh
# Mysql_backup.sh: backup
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.