Hot Backup of shell script files every three hours

Source: Internet
Author: User

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 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 ........................ ...................................

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.