[SOLVED] Yet Another Backup Script for Community Version

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
kazooless
Advanced member
Advanced member
Posts: 91
Joined: Sat Sep 13, 2014 12:08 am

[SOLVED] Yet Another Backup Script for Community Version

Post by kazooless »

That was the case in my situation. I am by far not an expert, so I can't tell you what *will* happen in your case. :D
[quote user="kkimmell"]So an install of bsd-mailx with whatever dependencies Ubuntu grabs will get me a working copy of mailx that in no way effects Zimbra's functionality nor the ability of the server to send and receive emails through Zimbra?
Thanks,

KK[/QUOTE]
Mr Spock
Posts: 6
Joined: Fri Sep 12, 2014 11:19 pm

[SOLVED] Yet Another Backup Script for Community Version

Post by Mr Spock »

[quote user="kkimmell"]So an install of bsd-mailx with whatever dependencies Ubuntu grabs will get me a working copy of mailx that in no way effects Zimbra's functionality nor the ability of the server to send and receive emails through Zimbra?
Thanks,

KK[/QUOTE]
I've been using a utility called ssmtp since the days of Debian Etch (4.0). I know it is in the EPEL repository for CentOS 6. Don't know if it exists for Ubuntu, but I can assure that it works flawlessly with this backup script!
11139dimitrios
Posts: 10
Joined: Sat Sep 13, 2014 12:29 am

[SOLVED] Yet Another Backup Script for Community Version

Post by 11139dimitrios »

[quote user="raid3868"]Hi tks,
I have solve the problem and is very easy after all.
very thanks.[/QUOTE]
How you solve this problem?

Thanks
Fr0ggynator
Posts: 2
Joined: Sat Sep 13, 2014 3:32 am

[SOLVED] Yet Another Backup Script for Community Version

Post by Fr0ggynator »

Hey everyone,
i'm hoping my question isn't wrong in place here.
So far I'm running a Zimbra Open Source v8.0.5 and downloaded the backup script. I modified the parameters at the top and when trying to run the script I get the following error:

zmbak_v.0.8.sh: 138: [: Illegal number:

zmbak_v.0.8.sh: 158: zmbak_v.0.8.sh: Syntax error: "(" unexpected
When editing with nano:
(137) ROOT_UID=0

(138) if [ "$UID" -ne "$ROOT_UID" ]

(139) then

(140) echo "Run script as "root"."

(141) echo ""

(142)exit 1

(143)fi
and
(155) STATPIDBASE="$ZM_HOME""zmstat/pid/" # Location of Zimbra's PID files

(156) touch $LOG # Create log file

(157) HOSTNAME=`hostname --fqdn` # Set hostname

(158) STARTTIME=(`date +%s`) # Script Timer start
I did a bit of shell scripting but can't spot the problem. Can anyone help me?
Thanks in advance :)
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1668
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

[SOLVED] Yet Another Backup Script for Community Version

Post by quanah »

Ubuntu defaults "sh" to /bin/dash which generally doesn't work with bash scripts. You may need to adjust it to use /bin/bash.
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
Fr0ggynator
Posts: 2
Joined: Sat Sep 13, 2014 3:32 am

[SOLVED] Yet Another Backup Script for Community Version

Post by Fr0ggynator »

I'm already using bin/bash as my default shell...
kazooless
Advanced member
Advanced member
Posts: 91
Joined: Sat Sep 13, 2014 12:08 am

[SOLVED] Yet Another Backup Script for Community Version

Post by kazooless »

[quote user="Mr.Twister"]New version.
# VERSION: .0.8.2 , proposed 2014-01-28 AVV

#

# - fixed bug with collecting to media[/QUOTE]
Found another bug. Took me forever to find out why collecting to media wasn't working:
if [ "$TMC_Enabled" = "yes" ]
should be:
if [ "$TMC_Enable" = "yes" ]
farukanar
Posts: 1
Joined: Sat Sep 13, 2014 3:34 am

[SOLVED] Yet Another Backup Script for Community Version

Post by farukanar »

[quote user="raid3868"]Hi tks,
I have solve the problem and is very easy after all.
very thanks.[/QUOTE]
I think the problem is solved just by checking the /etc/hosts entry and the IP address. If they do not match, you will receive this error.
bbrunner
Posts: 1
Joined: Sat Sep 13, 2014 3:35 am

[SOLVED] Yet Another Backup Script for Community Version

Post by bbrunner »

Have you been able to get this resolved?
I am having the same issue where the cold rsync takes from 2 to 30 minutes.


BillB

[quote user="kazooless"]I recently upgraded from v6 to 8.06 and am having major performance issues. I've narrowed them down to running this backup (which I've been using for years now). I've updated my script to Mr. Twister's (immediately preceding this reply) zmbak_v.0.8.1.sh.txt and it helped a bit. However, when the rsync runs, even on the differential, it is taking an hour now when it used to take 2 to 3 minutes. This morning, after the diff job kicked off at 3am, it is still running 5 hours later and I can't even ssh in or get to the console. The hard drive is churning and I can still ping, so I am afraid to do a hard reset.
I am not sure what to look at next. Is there a switch I can turn on in the script to make the logging more verbose? I am definitely skipping the mdb's in the initial copy.
Thanks,
kazooless
LOG FILE:[/QUOTE]
vhinzsanchez
Posts: 8
Joined: Wed Mar 25, 2015 4:10 am

[SOLVED] Yet Another Backup Script for Community Version

Post by vhinzsanchez »

Hi, 

I would like to ask if the file in osoffice.de (v.0.8) is updated one.  While I am not new to linux, I do consider myself a newbie in CLI.  Now, we have Zimbra 7.1.3 on Ubuntu 10.04, its quite old but working.  However, I do want to set up a backup on the server and stumbled on zmbak script which I do like because of the full and diff backups.  Running "df -h" in the terminal, I can see that our (Zimbra dedicated) server is using almost 500GB with more or less 160 active mailboxes.
Testing in an isolated environment, I hit an error running ./zmbak.sh and hit an error in mailx (auto) installation, it seems that ubuntu.lnix.net is not responding to download queries.  I will try manual install tomorrow.
Post Reply