Increase full scan schedule frequency
Results 1 to 5 of 5
Like Tree6Likes
  • 3 Post By stsimb
  • 3 Post By stsimb

Thread: Increase full scan schedule frequency

  1. #1
    Senior Member
    Join Date
    Oct 2013
    Posts
    70

    Increase full scan schedule frequency

    Is there a way to schedule full scans once every 15 days or once a month?

    On some of our backends running every week is too frequent..

    Operation Host: zm-mbox-02.cloud.forthnet.prv
    Operation Start Time: 20/06/2014 20:01:00
    Operation Duration: 4 days, 11 hours, 58 minutes, 46 seconds
    - stats -
    new accounts: 0
    accounts updated: 52
    skipped accounts(by COS): 0
    item updated: 496189
    new metadata: 147540
    new files: 52219
    checked items: 5215237
    backup path: /mail-backup/zm-mbox-02.cloud.forthnet.prv/
    skipped items: 97
    num skipped files: 0
    I/O read exception: 0
    items/sec: 15.4200945


    Operation Host: zm-mbox-03.cloud.forthnet.prv
    Operation Start Time: 22/06/2014 01:01:00
    Operation Duration: 3 days, 6 hours, 34 minutes, 35 seconds
    - stats -
    new accounts: 0
    accounts updated: 74
    skipped accounts(by COS): 0
    item updated: 313643
    new metadata: 59247
    new files: 31134
    checked items: 4857596
    backup path: /mail-backup/zm-mbox-03.cloud.forthnet.prv/
    skipped items: 8
    num skipped files: 0
    I/O read exception: 0
    items/sec: 18.720753

  2. #2
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,342
    Hello stismb!

    You can disable the built-in *scan scheduling in the "ZxBackup" section of the ZeXtras Administration Zimlet and set up your own schedule using Cron to start either a SmartScan or a FullScan according to your needs.

    The ZxCli commands you need to schedule are:
    - `zxsuite backup doSmartScan`
    - `zxsuite backup doFullScan`

    The notification you posted, however, somewhat worries me as it underlines a very low number of iops.
    Is your Backup Path on a remote network share or on a low-performance storage (e.g. USB SATA2 disk)? If not, I suggest to check the health of your storage...

    Have a nice day,
    Cine
    the ZeXtras Team
    IT Support Team Contact Form
    Sales Team Contact Form

    ZeXtras Website
    # ZeXtras Wiki # ZeXtras Store

    Have ZeXtras Suite or ZeXtras Migration Tool been helpful to you?
    Share your experience in the Zimbra Gallery!

    ZeXtras Suite on the Zimbra Gallery
    ZeXtras Migration Tool on the Zimbra Gallery

  3. #3
    Senior Member
    Join Date
    Oct 2013
    Posts
    70
    Hi Cine, thanks for your reply.

    I will disable the built-in scheduling for these two backends and use cronjobs, thanks.

    As for our backup path, it's an NFS share mounted from another server using SATA disks...

  4. #4
    Senior Member
    Join Date
    Oct 2013
    Posts
    70
    In case anyone else needs it, here is a script for zimbra's crontab that schedules a Full Scan on the first day of the month, and Smart Scan every other day..

    Code:
    #!/bin/bash
    
    FULLALREADYRUNNING="$(/opt/zimbra/bin/zxsuite backup getAllOperations | egrep -A3 "(Full|Smart)Scan" | grep -c started)"
    
    if [ "x${FULLALREADYRUNNING}" == "x1" ]; then
        echo "Full or Smart Scan already running, skipping backup schedule"
        exit 1
    fi
    
    DAY="$(date +%d)"
    
    if [ "x${DAY}" == "x01" ]; then
        # start FullScan on 1st day of the month
        /opt/zimbra/bin/zxsuite backup doFullScan
    else
        # start SmartScan on all other days (except if FullScan is already running)
        /opt/zimbra/bin/zxsuite backup doSmartScan
    fi
    d0s0n, Cine and idr_mito like this.

  5. #5
    Senior Member
    Join Date
    Oct 2013
    Posts
    70
    Since FullScan is gone in version 1.8.17+, we can adapt this script for the new Purge operation.
    Code:
    #!/bin/bash
    # http://forums.zextras.com/zxbackup/970-increase-full-scan-schedule-frequency.html
    
    FULLALREADYRUNNING="$(/opt/zimbra/bin/zxsuite backup getAllOperations | egrep -A2 "descName.*(Purge|SmartScan)" | grep -ci started)"
    
    if [ ${FULLALREADYRUNNING} -gt 0 ]; then
        echo "$(date) $0 Purge or Smart Scan already running, skipping backup schedule" | tee -a /tmp/zxsuite-backup.log
        exit 1
    fi
    
    DAY="$(date +%d)"
    
    if [ "x${DAY}" == "x01" ]; then
    	# start Purge on 1st day of the month
    	/opt/zimbra/bin/zxsuite backup doPurge
    	echo "$(date) $0 Purge scheduled" | tee -a /tmp/zxsuite-backup.log
    else
    	# start SmartScan on all other days (except if Purge is already running)
    	/opt/zimbra/bin/zxsuite backup doSmartScan
    	echo "$(date) $0 Smart Scan scheduled" | tee -a /tmp/zxsuite-backup.log
    fi
    Cine, phoenix and phoenix like this.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •