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 02-05-2010, 05:56 PM
Starter Member
 
Posts: 2
Default [SOLVED] Switch to zimbra user

Hello, I am trying to automate my backup using my exisiting backup solution. What I use now is rdiff-backup. I have a script that looks like this

Code:
#!/bin/bash

sudo -u zimbra zmcontrol stop >> /root/logs/zmcontrol.log
rdiff-backup -v5 --print-statistics /opt root@192.168.0.206::/srv/Zimbra >> /root/logs/zimbra.log
sudo -u zimbra zmcontrol start >> /root/logs/zmcontrol.log
it doesn't work.

What I want to happen is the script (excuted as root) will execute zmcontrol stop as the user zimbra then run the backup then start zmcontrol as zimbra

would just executing the script as zimbra be ok? only /opt is being copied

thanks for any help
Reply With Quote
  #2 (permalink)  
Old 02-05-2010, 07:00 PM
Starter Member
 
Posts: 2
Default

I got it working, here is what I did if anyone wants to know


zmcontrol is at /opt/zimbra/bin/zmcontrol

so in my script instead of
Code:
sudo -u zimbra zmcontrol stop
it is

Code:
sudo -u zimbra /opt/zimbra/bin/zmcontrol stop
Seems to work as it should
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.