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
  #1 (permalink)  
Old 03-06-2010, 06:32 AM
Starter Member
 
Posts: 2
Default Zimbra, Ubuntu, BackUp and Permissions.

At the start it was written, please ensure you write in the right thread. I can only say, I do hope so to, but Im not sure. (never got the hang of forums)

Im runnint Zimbra 6.0.5 64 bit open source version on a Ubuntu 8.0.4 Hardy 64 bit. Everything works well, I do belive. Except for two things.

Everytime the system reboots I get the wrong permissions on some files. According to the admin mail that the server sends. I searched the wild webb and found this command.

cd /opt/zimbra/libexec/ and ./zmfixperms --extended --verbose

Works like a charm, but well, to do that every time, seams a bit hard work. So for my first question, is there a solution to this?

My next question, I would like, and have tried to set up a automatic backup script, byt stopping Zimbra, then backup, then start up the backup again.
I used a "Simple backup script" found on the webb, but it refuses to start up the Zimbra server again.

Well, needless to say Im not a linux hacker, so I have no idea what to do. Wondering if someone has a working script (with som changes) that I can implement to my mail server.

Cheers,
McDuck Mallard
Reply With Quote
  #2 (permalink)  
Old 03-06-2010, 10:20 AM
Loyal Member
 
Posts: 81
Default

What files end up having the wrong permissions after a reboot? Are you running anything else on the server? I haven't seen this on any of my machines.

On the forums here there are a number of scripts and methods outlined for backup/restore of the open source edition. Here is an example of one of those scripts modified to suit my needs:

Code:
#!/bin/bash


# the destination directory for local backups
DESTLOCAL=/opt/zimbra.bak

# the destination for remote backups
DESTREMOTE="user@remotehost.com:zimbra.bak"

# Outputs the time the backup started, for log/tracking purposes
echo Time backup started = $(date +%T)
before="$(date +%s)"


# Live sync before stopping Zimbra to minimize sync time with the services down
# Comment out the following line if you want to try single cold-sync only
rsync -avHK --delete /opt/zimbra $DESTLOCAL


# Now we need to shut down Zimbra to rsync any files that were/are locked
# whilst backing up when the server was up and running.
before2="$(date +%s)"

# Stop Zimbra Services
su - zimbra -c "/opt/zimbra/bin/zmcontrol stop"
sleep 15

# Kill any orphaned Zimbra processes
pkill -9 -u zimbra

# Sync to backup directory
rsync -avHK --delete /opt/zimbra $DESTLOCAL

# Restart Zimbra Services
su - zimbra -c "/opt/zimbra/bin/zmcontrol start"

# Calculates and outputs amount of time the server was down for
after="$(date +%s)"
elapsed="$(expr $after - $before2)"
hours=$(($elapsed / 3600))
elapsed=$(($elapsed - $hours * 3600))
minutes=$(($elapsed / 60))
seconds=$(($elapsed - $minutes * 60))
echo SERVER WAS DOWN FOR: "$hours hours $minutes minutes $seconds seconds"

# Display Zimbra services status
echo Displaying Zimbra services status...
su - zimbra -c "/opt/zimbra/bin/zmcontrol status"

# backup the backup dir (but not the backups of the backups) to remote
rsync -e ssh -avHK --delete-during $DESTLOCAL $DESTREMOTE

# Outputs the time the backup finished
echo Time backup finished = $(date +%T)

# Calculates and outputs total time taken
after="$(date +%s)"
elapsed="$(expr $after - $before)"
hours=$(($elapsed / 3600))
elapsed=$(($elapsed - $hours * 3600))
minutes=$(($elapsed / 60))
seconds=$(($elapsed - $minutes * 60))
echo Time taken: "$hours hours $minutes minutes $seconds seconds"

# end
I run that script from another script that is scheduled with cron and it handles creating a log of the backup etc.
__________________
Jacob Turner
Ringnebula Systems - Ukiah, CA
Reply With Quote
  #3 (permalink)  
Old 03-06-2010, 11:01 AM
Starter Member
 
Posts: 2
Default

As soon as the Zimbra server shuts down (just the server, not machine)
this comes up in the zimbra admin mail.

Warnings
--------
master (total: 2)
1 /opt/zimbra/postfix/libexec/showq: bad command startup -- throt...
1 process /opt/zimbra/postfix/libexec/showq pid 12868 exit status 1
postfix-script (total: 8)
2 not owned by root: /opt/zimbra/postfix-2.6.5.2z/conf/master.cf.in
2 not owned by root: /opt/zimbra/postfix-2.6.5.2z/conf/main.cf
2 not owned by root: /opt/zimbra/data/postfix/spool
2 not owned by root: /opt/zimbra/postfix-2.6.5.2z/conf/master.cf

The server it self just runs Zimbra OpenSource edition 6.0.5 (latest) 64 bit version. And Ubuntu server 8.0.4 LTS Hardy edition 64 bit version.

Its only job is to be a mail / calender server. (Zimbra)
Reply With Quote
  #4 (permalink)  
Old 03-07-2010, 04:28 PM
Loyal Member
 
Posts: 81
Default

A much older post mentioned the same error and it is appearantly not a problem.

main.cf "not owned by root" ?
__________________
Jacob Turner
Ringnebula Systems - Ukiah, CA
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.