Page 59 of 66 FirstFirst ... 9495758596061 ... LastLast
Results 581 to 590 of 659

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

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

    Default

    Quote Originally Posted by jjeffers1 View Post
    After some troubleshooting I discovered the /store directory is being passed up by dar because it is a symlink. I currently have the store directory symlinked to a larger disk on the server.

    Mysql and other directories are symlinked as well but to other directories under /opt/zimbra.

    I was under the impression mysql was not being backed up but it was because it was symlinked to mysql-standard-5.1.55-pc-linux-gnu-i686-glibc23.

    But back to the issue with /store which is truly symlinked outside of /opt/zimbra in my environment. I am looking to the DAR documentation for a solution and apparently DAR should be able to handle and symlinks based on this exerpt from the DAR's features section:

    Any ideas how to make DAR recognize symlinks?
    Heh. I had started a reply about symlinks, but decided you wouldn't be doing that just for a trial, and inferred mysql was empty on your test restore.

    Dar does not follow symlinks to directories out of its root path (which for this script is $SYNC_DIR). You will have to change the script to point to any other directories you want in the dar. I would suggest the following changes:
    1) Create a new DAR_OPTS options line near the top of the script, right under RSYNC_OPTS:
    Code:
    RSYNC_OPTS="-aHK --delete --stats --exclude=*.pid" # leave these unless you are sure you need something else
    DAR_OPTS="-R / -g path/to/SYNC_DIR -g path/to/store -g path/to/db"
    Note the lack of a leading slash for the -g directories. All paths are relative to the -R root. You will have to use / for dar root, if you want to get it all in one go. The side effect of this is that the path of the files within the dar will be different from the script default. In a dar -l listing, instead of (scroll to right)
    Code:
    [Saved]       [-----]   drwxrwxr-x   501        zimbra  0       Thu Aug  4 15:02:10 2011        logger
    [Saved]       [-----]   drwxr-xr-x   zimbra     zimbra  0       Thu Aug  4 15:02:10 2011        logger/db
    [Saved]       [-----]   drwxrwxr-x   zimbra     zimbra  0       Sun Mar 25 04:04:09 2012        logger/db/data
    Assuming /backup/sync is your SYNC_DIR, you will see (scroll to right)
    Code:
    [Saved]       [-----]   drwxrwxr-x   501        zimbra  0       Thu Aug  4 15:02:10 2011        backup/sync/logger
    [Saved]       [-----]   drwxr-xr-x   zimbra     zimbra  0       Thu Aug  4 15:02:10 2011        backup/sync/logger/db
    [Saved]       [-----]   drwxrwxr-x   zimbra     zimbra  0       Sun Mar 25 04:04:09 2012        backup/sync/logger/db/data
    Notice that SYNC_DIR precedes the rest of the path, using this modification. Similarly, the store and db directories would have a path relative to / and not /opt/zimbra. For that reason, on restores you should be positive that your restore destination is NOT / if you do not want to overwrite an existing SYNC_DIR, db, and store.

    2) You will also need to remove the "-R `pwd`" root setting at the 4 places in the script where $DAR_BIN -c gets called, and add $DAR_OPTS to the command:
    Code:
                nice -19 $DAR_BIN $DAR_OPTS -K bf:$KEY -s $ARCHIVESIZE -z$COMPRESS -Z "*.gz" -Z "*.zip"\                                                                                
                -Z "*.bz2" -Z "*.tgz" -Z "*.zgz" -Z "*.jar" -Z "*.tiff" \
                -Z "*.jpg" -Z "*.png" -Z "*.gif" -Z "*.jpeg" \
                -c "$ARCHIVEDIR""$ARCHIVENAME" -Q
    Or, skip DAR_OPTS and just make all the changes in all 4 places:
    Code:
                nice -19 $DAR_BIN -K bf:$KEY -s $ARCHIVESIZE -z$COMPRESS -Z "*.gz" -Z "*.zip"\                                                                                
                -Z "*.bz2" -Z "*.tgz" -Z "*.zgz" -Z "*.jar" -Z "*.tiff" \
                -Z "*.jpg" -Z "*.png" -Z "*.gif" -Z "*.jpeg" -R "/" \
                -g "path/to/SYNC_DIR" -g "path/to/db" -g "/path/to/store" \
                -c "$ARCHIVEDIR""$ARCHIVENAME" -Q
    I know that tar can follow symlinks, but that has its own complications.
    Last edited by LaFong; 03-26-2012 at 06:43 PM.

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

    Default

    Yes, you can hard link symbolic links!
    Oh, and this just means that symlinks take up an inode, and hard links can point to that inode. And hard links have to be on the same filesystem (i.e. partition) as the inode they're pointing at, so it would not help your issue.

  3. #583
    savez is offline Member
    Join Date
    Sep 2011
    Posts
    10
    Rep Power
    3

    Default

    hello LaFOng,
    I read your post

    voelvo ask if I could move the files and instructions to use your backup script to zimbraCE ....


    Thank you and good job you're good

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

    Default

    Quote Originally Posted by locuse View Post
    hi,

    i've been combing thru posts looking for a good understanding of exactly what is required for a "true", "full", "disaster recovery" backup.

    full cold copy of all of "/opt/zimbra" seems to be the guidance, but -- is it really 'all'?
    Almost. Many/most installations will also require split DNS. That will require BIND or other setup, which varies a bit depending on the distro and DNS server. You would want to backup that config. You'll also want to backup any config of SSH, fail2ban, hosts, passwd, shadow, init.d, resolv.conf, etc. These are in /etc, usually. Easiest to backup all of /etc.

    in particular, i'm interested in understanding whether the 'spaecial files' -- aka sockets, devices, pipes, fifos, blocks, etc etc -- are required to be backed up, or can they all (or some portion of them) be excluded from the backup?

    i've just recently asked this question here,

    https://www.zimbra.com/forums/admini...p-restore.html

    but, given the broad interest in this (rather long) thread re: general backup issues, i thought i'd ask here as well.
    They could be excluded. This script does not back them up. If you are using a different backup method, which is not specific to Zimbra, there is little reason to go out of your way to exclude them. They take up little room compared to user data. If you are just doing Zimbra backup, the disaster restore would go like this:
    1. Install OS. (Same OS version)
    2. Install DNS.
    3. Restore DNS config.
    4. Restore misc. config (SSH, hosts, etc.)
    5. Install Zimbra (Exact same version)
    6. Stop Zimbra.
    7. Restore /opt/zimbra.
    8. Start Zimbra.


    There are edge cases, e.g. where people use symlinks for /opt zimbra/store and put the store on a different partition, but this is not common.

  5. #585
    liverpoolfcfan's Avatar
    liverpoolfcfan is offline Outstanding Member
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    712
    Rep Power
    6

    Default

    Each night when the DB backup is done I get the following line in the middle of all the mailbox backups

    Code:
    E-Mail                                User DB         LDAP        zimbraId                                 
    ------                                ------------    ----        -------                                  
    ...
    mboxgroup                             .ldif           fbd258fb-f8c8-461e-84fa-754d642b5f21                                         
    ...
    There is no associated email address - or mailbox number

    Can anyone suggest what I need to do to clean this up ?

    Thanks.

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

    Default

    Quote Originally Posted by liverpoolfcfan View Post
    Each night when the DB backup is done I get the following line in the middle of all the mailbox backups

    Code:
    E-Mail                                User DB         LDAP        zimbraId                                 
    ------                                ------------    ----        -------                                  
    ...
    mboxgroup                             .ldif           fbd258fb-f8c8-461e-84fa-754d642b5f21                                         
    ...
    There is no associated email address - or mailbox number

    Can anyone suggest what I need to do to clean this up ?
    Try the commands below to identify the user.
    Code:
    sudo su - zimbra
    source ~/bin/zmshutil ; zmsetvars
    ldapsearch -x -H ldap://"$HOSTNAME" -D "$zimbra_ldap_userdn" -w "$zimbra_ldap_password" '(&(objectClass=zimbraAccount)(zimbraId=fbd258fb-f8c8-461e-84fa-754d642b5f21))'

  7. #587
    raid3868 is offline Junior Member
    Join Date
    Apr 2012
    Posts
    5
    Rep Power
    3

    Default Backup with fetchmail crontab disable

    Hi,

    I m very new in zimbra and still testing, currently i have installed zimbra and is working,
    at this stage i m testing dor backup and restore. I have download this download script,
    backup working good. But i m using fetchmail with schedule every 15min to fetch thirty party pop server, it work with no problem. but come to backup it need to add some script
    to disable fetchmail before backup.

    fetchmail crontab is running as user admin.

    Can someone help how can i add script to disable fetchmail crontab before shutting down zimbra as i saw that this backup has disable zimbra crontab. but i don't understand how to add the script to. can someone pls help.

    thks

  8. #588
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default

    OK, I have been using this script for quiet some time and failed to understand how do I disable dar file function so that script would not dar the files. This is actually consuming my space since I am running very low on space hence I have written small script to delete those files but If I done that script failed to take a DIFF backup not sure which parameter or file it verifies and proceed with backup for that particular week.

    Any clue? How do I completely disable dar functions?

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

    Default

    Quote Originally Posted by blason View Post
    OK,
    Any clue? How do I completely disable dar functions?
    If you don't want dar, there is little reason to use this script. Just use a basic rsync script. You will not have dated backups unless you use a separate backup tool on your SYNC_DIR.

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

    Default

    Quote Originally Posted by raid3868 View Post
    Hi,
    Can someone help how can i add script to disable fetchmail crontab before shutting down zimbra as i saw that this backup has disable zimbra crontab. but i don't understand how to add the script to. can someone pls help.
    Possible solutions include setting your fetchmail crontab to exclude your backup crontab time, or change one of the scripts to use pgrep or similar to detect whether the other script is running.

Page 59 of 66 FirstFirst ... 9495758596061 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 4 users browsing this thread. (0 members and 4 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
  •