Hot backup of shell script files every three hours
Source: Internet
Author: User
Hot standby shell script file mysql1 # catmysqlbackup. sh #! /Usr/local/bin/fish # The backup policy is daily full backup # set the backup path variable setbackupdir/usr/db/backup # Generate the backup directory mkdir-p $ backupdir # The backup deletion time exceeds one month... hot standby shell script file mysql1 # cat mysqlbackup every three hours. sh #! /Usr/local/bin/fish # The backup policy is daily full backup # set the backup path variable set backupdir/usr/db/backup # Generate the backup directory mkdir-p $ backupdir # Delete the backup time backup for more than one month find $ backupdir/-mtime + 30-type d-delete # start backup innobackupex -- user = root -- password = 'yue5bkgof $ '-- parallel = 12 $ backupdir/ mysql1 # cd/usr/db/backup/mysql1 # mysql1 # lltotal 442drwxr-xr-x 8 root wheel 512 Mar 1 Mar 8 root wheel 512 Mar 1 Mar 1 Mar 8 root wheel 512 Mar 1 Mar 1 8 root wheel 512 Mar 1 Mar 8 root wheel 512 Mar 1 Mar drwxr-xr-x 8 root wheel 512 Mar 1 Mar 8 root wheel 512 Mar 1 Mar 1 Mar 8 root wheel 512 Mar 2 Mar 8 root wheel 512 Mar 2 Mar 8 root wheel 512 Mar 2 Mar 8 root wheel 512 Mar 2 Mar 8 root wheel 512 Mar 2 am 8 root wheel Mar 2 Mar 2 2013-03-02_12-01-191-19drwxr-xr-x 8 root wheel 512 Mar 2 Mar 8 root wheel 512 Mar 2 Mar 2013-03-02_18-01-13drwxr-xr-x 8 root wheel 512 Mar 2 Mar 8 root wheel 512 Mar 3 Mar 3 8 root wheel 512 Mar 3 Mar 8 root wheel 512 Mar 3 Mar 3 Mar 8 root wheel 512 Mar 3 Mar 8 root wheel 512 Mar 3 am 2013-03-03_15-01-19drwxr-xr-x 8 root wheel 512 Mar 3 Mar 3 am 8 root wheel 512 Mar 3 2013-03-03_21-01-23drwxr-xr-x 8 root wheel 512 Mar 4 Mar 8 root wheel 512 Mar 4 Mar 8 root wheel 512 Mar 8 root wheel 512 Mar 4 Mar 8 root wheel Mar 4 Mar 4 am 8 root wheel 512 Mar 4 2013-03-04_12-01-12drwxr-xr-x 8 root wheel 512 Mar 4 Mar 8 root wheel 512 Mar 4 Mar 8 root wheel 512 Mar 5 Mar 4 Mar 8 root wheel 512 Mar 5 Mar 8 root wheel 512 Mar 5 Mar 8 root wheel 512 Mar 5 Mar 8 root wheel 512 Mar 5 am 8 root wheel 512 Mar 5 am _ drwxr-xr-x 8 root wheel Mar 5 Mar 8 root wheel 512 Mar 5 Mar 8 root wheel 512 Mar 5 Mar 2013-03-05_21-01-22drwxr-xr-x 8 root wheel 512 Mar 6 Mar 8 root wheel 512 Mar 6 Mar 6 am 8 root wheel 512 Mar 6 2013-03-06_09-01-23drwxr-xr-x 8 root wheel 512 Mar 6 2013-03-06_12-01-24 ........................ ...................................
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service