Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #541 (permalink)  
Old 02-10-2012, 07:46 PM
Junior Member
 
Posts: 7
Default

Quote:
Originally Posted by Eclipse View Post
You should state what version of Zimbra this script is for...
As far as I can tell, neither of the scripts are version-specific. I'm using zmbak_v.0.8.sh and zmDBbac.sh (0.5 alpha).
Reply With Quote
  #542 (permalink)  
Old 02-10-2012, 08:14 PM
Junior Member
 
Posts: 7
Default

Quote:
Originally Posted by LaFong View Post
I'm guessing you're running from the command line. The cronjob actually forces bash. You can force bash from the command line:
Code:
/bin/bash -c '/usr/local/sbin/zmbak.sh -f > /var/log/zim_backup.log 2>&1'
This produced the same results as before.
Reply With Quote
  #543 (permalink)  
Old 02-10-2012, 08:35 PM
Junior Member
 
Posts: 7
Default

Ran the script with encryption turned off and it ran without a hitch. Encryption isn't strictly necessary, but I'm curious about what it is in these scripts that prevents that.
Reply With Quote
  #544 (permalink)  
Old 02-10-2012, 09:18 PM
Senior Member
 
Posts: 66
Default

Quote:
Originally Posted by mailman1175 View Post
As far as I can tell, neither of the scripts are version-specific. I'm using zmbak_v.0.8.sh and zmDBbac.sh (0.5 alpha).
So do you mean to say that it works with ZCS 7?
Reply With Quote
  #545 (permalink)  
Old 02-11-2012, 06:56 AM
Junior Member
 
Posts: 7
Default

Quote:
Originally Posted by Eclipse View Post
So do you mean to say that it works with ZCS 7?
No. I mean to say neither of the scripts specify that they are designed to work only with certain versions. Nor do they say that they will NOT work with certain versions. It may be the case that the scripts do not work with ZCS 7. It would be useful for the persons who posted the scripts in this thread to indicate with which versions they are compatible.
Reply With Quote
  #546 (permalink)  
Old 02-11-2012, 09:31 PM
Advanced Member
 
Posts: 213
Default

Quote:
Originally Posted by mailman1175 View Post
No. I mean to say neither of the scripts specify that they are designed to work only with certain versions. Nor do they say that they will NOT work with certain versions. It may be the case that the scripts do not work with ZCS 7. It would be useful for the persons who posted the scripts in this thread to indicate with which versions they are compatible.
The script(s) are working with ZCS 7 for many others.
The problem is happening here:
Code:
  if [ "$CRYPT" = "yes" ]
    then
        KEY=`cat "$PASSDIR""$PASSFILE"`
        if [ "$FILTERLIST" = "yes" ]
        then
            nice -19 $DAR_BIN -K bf:$KEY -l "$ARCHIVEDIR""$ARCHIVENAME" -Q | grep -v "\[     \]       \[-----\]" \
            > "$ARCHIVEDIR""$ARCHIVENAME".txt && gzip -9 "$ARCHIVEDIR""$ARCHIVENAME".txt                                                     
          else
            nice -19 $DAR_BIN -K bf:$KEY -l "$ARCHIVEDIR""$ARCHIVENAME" -Q \
            > "$ARCHIVEDIR""$ARCHIVENAME".txt && gzip -9 "$ARCHIVEDIR""$ARCHIVENAME".txt
          fi
    else
The "Unknown argument : &" is likely related to the gzip'ing of the filelist, which follows the creation of the filelist. The "&&" in the code performs the next command if the first command is successful. The first command is probably not successful because of some issue with the encryption key, e.g. it was never set on install. Did you enter the encryption password during the install? It will never even ask you for the encryption password if you have it set to CRYPT="no" (the default) during install. The script should check for the key before attempting to decrypt, which I'd call a bug. You can manually set the encryption key if you like.

Last edited by LaFong; 02-11-2012 at 09:58 PM..
Reply With Quote
  #547 (permalink)  
Old 02-12-2012, 08:52 AM
Junior Member
 
Posts: 7
Default

Quote:
Originally Posted by LaFong View Post
The "Unknown argument : &" is likely related to the gzip'ing of the filelist, which follows the creation of the filelist. The "&&" in the code performs the next command if the first command is successful. The first command is probably not successful because of some issue with the encryption key, e.g. it was never set on install. Did you enter the encryption password during the install? It will never even ask you for the encryption password if you have it set to CRYPT="no" (the default) during install. The script should check for the key before attempting to decrypt, which I'd call a bug. You can manually set the encryption key if you like.
Thanks, LaFong, et al, for your help. I appreciate each of you taking time to answer the questions of an ignorant n00b. I don't know of any better way to learn, though, than by asking questions and fixing things I've broken. Better to do so with my own mail than with someone else's.

I don't recall the script asking for an encryption passphrase when I installed it the first time. I bounced back to a pre-install condition to try to go through the process again to make sure I didn't miss something (I did).

That leads me first to a question about the install process, so I'd like to back up a bit if that's ok.

When I run zmbak --INSTALL, the script wants to install mailx, using mta-dummy, and it points to a Zimbra forums post on installing mailx without postfix. Testing the instructions in that post (which are for Ubuntu 6.06; I'm on 10.04):

Code:
aptitude --safe-resolver --show-why install mailx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
"mailx" is a virtual package provided by:
  mailutils heirloom-mailx bsd-mailx
You must choose one to install.
This is where I ran into some other difficulties previously. Big problems. (I broke postfix. Told ya I wasn't a sysadmin. I'm learning everything the hard way.) So: Does it matter which of these packages I install? Or is the crucial step editing /etc/mail.rc, as mentioned in the other post to which I referred? (I know I neglected that part last time... #facepalm)

Now, encryption: Let's assume I get the mailx dependency satisfied successfully and install the script again. If the script doesn't prompt me for an encryption passphrase, how do I go about setting the key manually?

Last edited by mailman1175; 02-12-2012 at 09:34 AM..
Reply With Quote
  #548 (permalink)  
Old 02-12-2012, 11:18 AM
Special Member
 
Posts: 164
Default

By the way guys; just wanted to know if anybody has every tried ZMBKPOSE script with OS version? They claim it does a Hot backup and Restore is it really possible or can that be possible with this script?

Do let me know if any body has ever tried this before, I would love to hear the experiences before I try this in production environment.

here is the Link

HOT Backup and HOT Restore - Zimbra :: Wiki
Reply With Quote
  #549 (permalink)  
Old 02-12-2012, 01:21 PM
Advanced Member
 
Posts: 213
Default

Quote:
Originally Posted by mailman1175 View Post
When I run zmbak --INSTALL, the script wants to install mailx, using mta-dummy, and it points to a Zimbra forums post on installing mailx without postfix. Testing the instructions in that post (which are for Ubuntu 6.06; I'm on 10.04):

Code:
aptitude --safe-resolver --show-why install mailx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
"mailx" is a virtual package provided by:
  mailutils heirloom-mailx bsd-mailx
You must choose one to install.
This is where I ran into some other difficulties previously. Big problems. (I broke postfix. Told ya I wasn't a sysadmin. I'm learning everything the hard way.)
Postfix is part of Zimbra, so you'd need to be specific...did Ubuntu postfix get enabled somehow?
Quote:
So: Does it matter which of these packages I install? Or is the crucial step editing /etc/mail.rc, as mentioned in the other post to which I referred?
I'm not sure which one is better...probably the one which presents less hassle. I'd guess mailutils. The script relies on mail(x), which in turn relies on sendmail, so both steps are necessary.
Quote:
Now, encryption: Let's assume I get the mailx dependency satisfied successfully and install the script again. If the script doesn't prompt me for an encryption passphrase, how do I go about setting the key manually?
Set the PASSDIR and PASSFILE variables in the script as desired, then create password file. By default, the "noread" file is saved in the /etc/zmbak.sh directory. The commands below assume you are using the defaults. You must match the script with the names used below.
Code:
            mkdir -vp -m 600 /etc/zmbak.sh
            touch /etc/zmbak.sh/noread
            chmod 600 /etc/zmbak.sh/noread
            echo mypassword > /etc/zmbak.sh/noread
Reply With Quote
  #550 (permalink)  
Old 02-12-2012, 01:57 PM
Advanced Member
 
Posts: 213
Default

Quote:
Originally Posted by blason View Post
By the way guys; just wanted to know if anybody has every tried ZMBKPOSE script with OS version? They claim it does a Hot backup and Restore is it really possible or can that be possible with this script?

Do let me know if any body has ever tried this before, I would love to hear the experiences before I try this in production environment.

here is the Link

HOT Backup and HOT Restore - Zimbra :: Wiki
This is one of several scripts which take advantage of Zimbra's built-in user backup. I have not tried it, it looks pretty good. The advantage of this approach is restoring a single user is easier. It keeps a .tgz file for each user, which is easily imported. This version even does incremental backups. The disadvantage is that this method is not a substitute for true backup. Per the wiki page: "This tool DOES NOT DO disaster recovery." It doesn't back up any of the rest of Zimbra. If you do a full Zimbra backup plus this script, you are storing two copies of all the user data. Several people are using this general method for per-user backup, it does not overwrite any Zimbra stuff, so should work on a production server. I would still experiment on a test server first.

The script in this thread can also do per-user backup and restore, http://www.zimbra.com/forums/adminis...ost186403.html. I have tested on my small server, but not on a large multi-store-volume server.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.