Page 46 of 66 FirstFirst ... 36444546474856 ... LastLast
Results 451 to 460 of 659

Thread: [SOLVED] Yet Another Backup Script for Community Version

  1. #451
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    Quote Originally Posted by myriad View Post
    One more kind of off-topic question, but related to the posts above, if I wanted to implement the same schema for my web directory (on another Linode) should I just create a virtual drive for the "www" folder and modify the apache confs to ensure large uploads don't crash the system?
    If you upload a lot of stuff to the web server, that might be a good idea.
    I don't think its a good idea to to create a virtual director for the "var" folder since it has other stuff related to different parts of my Ubuntu install. What do you think?
    I agree.

  2. #452
    pebcomputing is offline Active Member
    Join Date
    Sep 2008
    Posts
    46
    Rep Power
    6

    Default Two emails: Error, followed by Success

    Since late last year, when we encountered an error because there were backups from week 51 of both 2009 and 2010 present in the backup directory, even though this as been fixed, we are now getting two email reports every night: 1 which states there was an error in the subject (though no error is reported in the body):
    Zimbra backup error on mail.zmbak.com
    root [root@mail.zmbak.com]
    Sent: Saturday, January 08, 2011 6:23 PM
    To:
    adminreports@zmbak.com
    Attachments:
    ============================
    Fri Jan 7 18:15:01 PST 2011
    Performing FULL backup
    ============================
    full Backup started at: Fri Jan 7 18:15:01 PST 2011
    Setting date & version Marker into /opt/zimbra/DATE_VERSION.txt
    Doing a hotsync of /opt/zimbra/ to /opt/zimbra_sync/
    Disabling the Zimbra crontab...
    Stopping the Zimbra server...

    Host mail.zmbak.com
    Stopping stats...Done.
    Stopping mta...Done.
    Stopping spell...Done.
    Stopping snmp...Done.
    Stopping archiving...Done.
    Stopping antivirus...Done.
    Stopping antispam...Done.
    Stopping imapproxy...Done.
    Stopping memcached...Done.
    Stopping mailbox...Done.
    Stopping logger...Done.
    Stopping ldap...Done.
    Doing a fast cold sync...
    Reinstating Zimbra's crontab...
    Starting Zimbra...
    Host mail.zmbak.com
    Starting ldap...Done.
    Starting logger...Done.
    Starting mailbox...Done.
    Starting memcached...Done.
    Starting antispam...Done.
    Starting antivirus...Done.
    Starting snmp...Done.
    Starting spell...Done.
    Starting mta...Done.
    Starting stats...Done.
    Service down time was - Hr:0 Min:5 Sec:16
    Running A hack... This one to check and start Stats subsystem
    Stats is not running, thus booting Stats subsystem!

    Terminating process 3230
    Terminating process 3267
    Terminating process 3251
    Terminating process 3220
    Terminating process 3235
    Terminating process 3224
    Terminating process 3227
    Terminating process 3281
    Terminating process 3222
    Terminating process 3300
    Stats have been stopped

    Logprocess done...
    zmqueuelog done...
    Invoking: /opt/zimbra/libexec/zmstat-proc
    Invoking: /opt/zimbra/libexec/zmstat-cpu
    Invoking: /opt/zimbra/libexec/zmstat-vm
    Invoking: /opt/zimbra/libexec/zmstat-io -x
    Invoking: /opt/zimbra/libexec/zmstat-df
    Invoking: /opt/zimbra/libexec/zmstat-io
    Invoking: /opt/zimbra/libexec/zmstat-fd
    Invoking: /opt/zimbra/libexec/zmstat-allprocs
    Invoking: /opt/zimbra/libexec/zmstat-mysql
    Invoking: /opt/zimbra/libexec/zmstat-convertd
    Invoking: /opt/zimbra/libexec/zmstat-mtaqueue
    Stats started...
    Services that are not running
    stats
    Writing a full backup: 01_Zimbra_Backup_20110107_FULL
    into: /bak/zimbra/ with file sizes of max: 8790M
    Saving Encrypted Archive...


    --------------------------------------------
    139144 inode(s) saved
    with 4233 hard link(s) recorded
    0 inode(s) changed at the moment of the backup
    0 inode(s) not saved (no inode/file change)
    0 inode(s) failed to save (filesystem error)
    0 inode(s) ignored (excluded by filters)
    0 inode(s) recorded as deleted from reference backup
    --------------------------------------------
    Total number of inode considered: 139144
    --------------------------------------------
    EA saved for 0 inode(s)
    --------------------------------------------
    Creating MD5 Checksum for 01_Zimbra_Backup_20110107_FULL.1.dar...
    copy archive to stockton.zmbak.com remote directory /backup/zimbrabak/
    Creating file listing from archive...

    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::
    full Zimbra Backup ended at: 19:37
    Backup took Hr:1 Min:22 Sec:14 to complete
    :::::::::::::::Cheers Osoffice for the script:::::::::::::::::::::::
    ============================
    Sat Jan 8 18:15:01 PST 2011
    Performing DIFF backup
    ============================
    diff Backup started at: Sat Jan 8 18:15:01 PST 2011
    Setting date & version Marker into /opt/zimbra/DATE_VERSION.txt
    Doing a hotsync of /opt/zimbra/ to /opt/zimbra_sync/
    Disabling the Zimbra crontab...
    Stopping the Zimbra server...

    Host mail.zmbak.com
    Stopping stats...Done.
    Stopping mta...Done.
    Stopping spell...Done.
    Stopping snmp...Done.
    Stopping archiving...Done.
    Stopping antivirus...Done.
    Stopping antispam...Done.
    Stopping imapproxy...Done.
    Stopping memcached...Done.
    Stopping mailbox...Done.
    Stopping logger...Done.
    Stopping ldap...Done.
    Doing a fast cold sync...
    Reinstating Zimbra's crontab...
    Starting Zimbra...
    Host mail.zmbak.com
    Starting ldap...Done.
    Starting logger...Done.
    Starting mailbox...Done.
    Starting memcached...Done.
    Starting antispam...Done.
    Starting antivirus...Done.
    Starting snmp...Done.
    Starting spell...Done.
    Starting mta...Done.
    Starting stats...Done.
    Service down time was - Hr:0 Min:5 Sec:11
    Running A hack... This one to check and start Stats subsystem
    Stats is not running, thus booting Stats subsystem!

    Terminating process 12422
    Terminating process 12446
    Terminating process 12426
    Terminating process 12414
    Terminating process 12424
    Terminating process 12418
    Terminating process 12420
    Terminating process 12455
    Terminating process 12416
    Terminating process 12487
    Stats have been stopped

    Logprocess done...
    zmqueuelog done...
    Invoking: /opt/zimbra/libexec/zmstat-proc
    Invoking: /opt/zimbra/libexec/zmstat-cpu
    Invoking: /opt/zimbra/libexec/zmstat-vm
    Invoking: /opt/zimbra/libexec/zmstat-io -x
    Invoking: /opt/zimbra/libexec/zmstat-df
    Invoking: /opt/zimbra/libexec/zmstat-io
    Invoking: /opt/zimbra/libexec/zmstat-fd
    Invoking: /opt/zimbra/libexec/zmstat-allprocs
    Invoking: /opt/zimbra/libexec/zmstat-mysql
    Invoking: /opt/zimbra/libexec/zmstat-convertd
    Invoking: /opt/zimbra/libexec/zmstat-mtaqueue
    Stats started...
    Services that are not running
    stats
    followed by a second email with the subject "Zimbra diff Backup Log on mail.zmbak.com" which is identical in the body to the above, with the addition of the rest of the zmbak process's log:
    Writing a diff backup: 01_Zimbra_Backup_20110108_DIFF
    into: /bak/zimbra/ with file sizes of max: 8790M
    Saving Encrypted Archive...
    Warning, the archive 01_Zimbra_Backup_20110107_FULL has been encrypted. A wrong key is not possible to detect, it would cause DAR to report the archive as corrupted


    --------------------------------------------
    593 inode(s) saved
    with 4244 hard link(s) recorded
    0 inode(s) changed at the moment of the backup
    138613 inode(s) not saved (no inode/file change)
    0 inode(s) failed to save (filesystem error)
    0 inode(s) ignored (excluded by filters)
    255 inode(s) recorded as deleted from reference backup
    --------------------------------------------
    Total number of inode considered: 139461
    --------------------------------------------
    EA saved for 0 inode(s)
    --------------------------------------------
    Creating MD5 Checksum for 01_Zimbra_Backup_20110108_DIFF.1.dar...
    copy archive to stockton.fileserver.com remote directory /backup/zimbrabak/
    Creating file listing from archive...

    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::
    diff Zimbra Backup ended at: 18:29
    Backup took Hr:0 Min:14 Sec:2 to complete
    :::::::::::::::Cheers Osoffice for the script:::::::::::::::::::::::
    What's causing the first email, which is incorrectly reporting an error, and how can I fix it? Ideas any one?

  3. #453
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    Quote Originally Posted by pebcomputing View Post
    Since late last year, when we encountered an error because there were backups from week 51 of both 2009 and 2010 present in the backup directory, even though this as been fixed, we are now getting two email reports every night: 1 which states there was an error in the subject (though no error is reported in the body):

    followed by a second email with the subject "Zimbra diff Backup Log on mail.zmbak.com" which is identical in the body to the above, with the addition of the rest of the zmbak process's log:


    What's causing the first email, which is incorrectly reporting an error, and how can I fix it? Ideas any one?
    The first message is probably caused by something in the script calling the mail_log function due to an error. The second is the normal mail. Many of the error messages the script generates only show up if you run it manually, not in a cron. Try that. (An improvement in the script would be to tee all messages to the log too, so both emails and console show the same error messages).

  4. #454
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    The move section of the script, from ARCHIVEDIR to TO_MEDIA_DIR, failed for me at the end of the year. It assumes the previous week number will be less than the current week number. This is not true at the start of the new year. I made a change which should hopefully fix that, then manually moved the previous week's dar files.

    old:
    Code:
    elif [ "$LAST_FULL_DAR" -lt "$BACKUPWEEK" ]
    new:
    Code:
    elif [ "$LAST_FULL_DAR" -lt "$BACKUPWEEK" ] || [ `expr "$LAST_FULL_DAR" - "$BACKUPWEEK"` -gt 50 ]

  5. #455
    onze's Avatar
    onze is offline Active Member
    Join Date
    Jan 2010
    Location
    PT
    Posts
    28
    Rep Power
    5

    Default

    Hello,
    Can this script be used in the NE version for remote scp backups?

    Thanks

  6. #456
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    Quote Originally Posted by onze View Post
    Hello,
    Can this script be used in the NE version for remote scp backups?
    Yes, though it may do more than you want it to. You really only need to remote backup the /opt/zimbra/backup directory, I believe. You might consider a simple rsync script to replicate that directory remotely.

  7. #457
    onze's Avatar
    onze is offline Active Member
    Join Date
    Jan 2010
    Location
    PT
    Posts
    28
    Rep Power
    5

    Default

    Quote Originally Posted by LaFong View Post
    Yes, though it may do more than you want it to. You really only need to remote backup the /opt/zimbra/backup directory, I believe. You might consider a simple rsync script to replicate that directory remotely.
    Hello LaFong,
    Im considering the following script,
    Open Source Edition Backup Procedure - Zimbra :: Wiki

    What do you think?

    Thanks

  8. #458
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    Quote Originally Posted by onze View Post
    Hello LaFong,
    Im considering the following script,
    Open Source Edition Backup Procedure - Zimbra :: Wiki

    What do you think?
    Yes, that looks like what you want. It's possible you might want to alter it to get just the /opt/zimbra/backup directory, instead of all of /opt/zimbra. You'd just need to change /opt/zimbra to /opt/zimbra/backup for the two local rsyncs. This would reduce the local cold rsync downtime, and reduce the remote rsync time, because there should be a lot less data to sync.

  9. #459
    myriad's Avatar
    myriad is offline Active Member
    Join Date
    Oct 2008
    Location
    Toronto
    Posts
    46
    Rep Power
    6

    Default Backup error (again)

    Hey LaFong I'm back!! The script was working fine for awhile but I am having a problem with 2 things:

    1. The main backup directory (in my case /zbackup) basically fills up and after a while crashes the script due to the fact there is no room on the virtual drive.

    2. More importantly, the script is now throwing an error:
    Writing a diff backup: 04_ZimbraBackup_20110201_DIFF
    into: /Backup/zimbra_dars/ with file sizes of max: 4395M
    Saving Unencrtyped Archive...
    Aborting program. User refused to continue while asking: /Backup/zimbra_dars/04_ZimbraBackup_20110124_FULL
    /Backup/zimbra_dars/04_ZimbraBackup_20110126_FULL
    /Backup/zimbra_dars/04_ZimbraBackup_20110130_FULL.1.dar is required for further operation, please provide the file.
    Dar had a problem!


    Here is the contents of the /zimbra_dars folder:
    04_ZimbraBackup_20110124_FULL.1.dar
    04_ZimbraBackup_20110126_FULL.1.dar
    04_ZimbraBackup_20110126_FULL.1.dar.md5
    04_ZimbraBackup_20110126_FULL.txt.gz
    04_ZimbraBackup_20110130_FULL.1.dar
    04_ZimbraBackup_20110130_FULL.1.dar.md5
    04_ZimbraBackup_20110130_FULL.txt.gz


    So the files are there. Any idea what my problem is? I just don't know where to look.

    Rick

  10. #460
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    Quote Originally Posted by myriad View Post
    Hey LaFong I'm back!! The script was working fine for awhile but I am having a problem with 2 things:

    1. The main backup directory (in my case /zbackup) basically fills up and after a while crashes the script due to the fact there is no room on the virtual drive.
    Only thing to do here is make more space available. Either make the virtual machine/drive bigger, or use a different drive or directory with more space. Note the size of /opt/zimbra now, then make /zbackup substantially bigger than that for future growth.

    2. More importantly, the script is now throwing an error:
    Writing a diff backup: 04_ZimbraBackup_20110201_DIFF
    into: /Backup/zimbra_dars/ with file sizes of max: 4395M
    Saving Unencrtyped Archive...
    Aborting program. User refused to continue while asking: /Backup/zimbra_dars/04_ZimbraBackup_20110124_FULL
    /Backup/zimbra_dars/04_ZimbraBackup_20110126_FULL
    /Backup/zimbra_dars/04_ZimbraBackup_20110130_FULL.1.dar is required for further operation, please provide the file.
    Dar had a problem!


    Here is the contents of the /zimbra_dars folder:
    04_ZimbraBackup_20110124_FULL.1.dar
    04_ZimbraBackup_20110126_FULL.1.dar
    04_ZimbraBackup_20110126_FULL.1.dar.md5
    04_ZimbraBackup_20110126_FULL.txt.gz
    04_ZimbraBackup_20110130_FULL.1.dar
    04_ZimbraBackup_20110130_FULL.1.dar.md5
    04_ZimbraBackup_20110130_FULL.txt.gz


    So the files are there. Any idea what my problem is? I just don't know where to look.
    You can't have more than one FULL in your /zimbra_dars folder, or diffs will fail. The script is supposed to move old fulls to the "TO_MEDIA_DIR" directory (which is set in the variable settings at the top of the script). For some reason, that hasn't been done in this case. Did you run dar manually? Here's an old post which discusses the issue, including code to check for old fulls:
    [SOLVED] Yet Another Backup Script for Community Version
    To fix the issue at hand, move all the files not starting with 04_ZimbraBackup_20110130_FULL to your TO_MEDIA_DIR directory.
    Last edited by LaFong; 02-01-2011 at 05:29 PM.

Page 46 of 66 FirstFirst ... 36444546474856 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Zimbra Backup Script ... Small Problem
    By frankb in forum Administrators
    Replies: 12
    Last Post: 07-14-2008, 08:40 AM
  2. Debian - Upgrade from 4.5.6
    By magikman in forum Installation
    Replies: 1
    Last Post: 01-19-2008, 12:59 PM
  3. Backup script issues
    By SSS in forum Administrators
    Replies: 18
    Last Post: 12-03-2007, 09:56 AM
  4. 4.0.4 to 4.5.6 upgrade failed in network edition
    By chenthil in forum Administrators
    Replies: 1
    Last Post: 08-27-2007, 09:36 AM
  5. [SOLVED] Simple backup question...
    By dameron in forum Administrators
    Replies: 3
    Last Post: 08-25-2007, 09:36 PM

Posting Permissions

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