Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Backup script issues

  1. #1
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    21
    Rep Power
    8

    Default Backup script issues

    I'm trying to get the Simple Shell Script Method from HERE working on my server.

    I've kept the script the same except for altering the backup folder directory

    The problem is, when I run it as root (testing it out see if it'll be ok with CRON) it all seems to run ok, but after the backup is complete I su to the zimbra account and do a zmcontrol status check and it says that the stats module is stopped.

    I can stop/start Zimbra as the zimbra user OK, it's just that doing it from sudo causes stats to not start.

    Any ideas?



    My other problem was trying to get the perl backup script from HERE working instead, but I seem to not have all the necessary modules installed.

    First I ran "yum install perl" just to make sure it was installed. I then ran the script and it complained about some IO/Scalar.pm being missing. Did some googling then yum installed perl-IO-Stringy. The script then complained about Proc/ProcessTable.pm being missing, googled then yum installed perl-Proc-ProcessTable.

    Now the script is failing saying it can't find File/Rsync.pm but I can't seem to find a perl package for that, and I'm pretty sure rsync is installed on the system anyway.

    Am I missing something? Is there a perl rsync module? Are there more modules I need to install or is there a package that has all that I need in it?

    Thanks for any help!

  2. #2
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    21
    Rep Power
    8

    Default

    bump!

    Any ideas

  3. #3
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Command prompt:

    Code:
    perl -MCPAN -e shell
    answer any installation questions that it asks then at the cpan> prompt::

    Code:
    install  File::Rsync
    The list of required modules is at the beginning of the script you're trying to run.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  4. #4
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    21
    Rep Power
    8

    Default

    Thanks Phoenix, that solved the perl rsync issue, but the script then started complaining about needing explicit package names. This perl stuff is going way over my head

    I think I'll try and get the bash script going instead.

    If I run this script as the Zimbra user when the status checks runs, everything is ok and 'running'
    Code:
    echo Stopping Zimbra services...
    zmcontrol stop
    sleep 15
    
    echo Starting Zimbra services...
    zmcontrol start
    sleep 15
    
    echo Showing Zimbra services status...
    zmcontrol status
    echo Done!
    But if I run the following script as user root, when the status check runs it says the stats module is stopped:
    Code:
    echo Stopping Zimbra services...
    sudo -u zimbra /opt/zimbra/bin/zmcontrol stop
    sleep 15
    
    echo Starting Zimbra services...
    sudo -u zimbra /opt/zimbra/bin/zmcontrol start
    sleep 15
    
    echo Showing Zimbra services status...
    sudo -u zimbra /opt/zimbra/bin/zmcontrol status
    echo Done!
    I'm a bit stumped as to why stats doesn't start up.

  5. #5
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    What release of Zimbra are you using and which operating system?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  6. #6
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    I think that sudo may have some problems, try the following format for the command (using su - ):

    Code:
    su - zimbra -c "zmcontrol start"
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  7. #7
    Join Date
    Jul 2007
    Location
    San Jose, CA
    Posts
    1,027
    Rep Power
    10

    Default

    Quote Originally Posted by phoenix View Post
    I think that sudo may have some problems, try the following format for the command (using su - ):

    Code:
    su - zimbra -c "zmcontrol start"
    Please post back if this does the trick. If it does I'll revise the script on the wiki.

  8. #8
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by dwmtractor View Post
    Please post back if this does the trick. If it does I'll revise the script on the wiki.
    I've already changed the wiki article and added a note at the end of it.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  9. #9
    Join Date
    Jul 2007
    Location
    San Jose, CA
    Posts
    1,027
    Rep Power
    10

    Default

    Quote Originally Posted by phoenix View Post
    I've already changed the wiki article and added a note at the end of it.
    Thanks Bill.

    Would this be a better default method since it doesn't rely on sudo at all? It hadn't occurred to me when I first played with it, do all Linux installations even include sudo?

    Dan

  10. #10
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    I've no idea if all distributions include sudo but if you feel that the 'su -' method is better then feel free change the script in the wiki.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Similar Threads

  1. Zimbra Backup Script ... Small Problem
    By frankb in forum Administrators
    Replies: 12
    Last Post: 07-14-2008, 08:40 AM
  2. FYI: ZCS NE backup to fuse/sshfs mount, worked.
    By jagipson in forum Administrators
    Replies: 0
    Last Post: 09-28-2007, 06:37 AM
  3. OSE rotating backup script
    By reckless2k2 in forum Installation
    Replies: 1
    Last Post: 07-04-2007, 04:55 AM
  4. Backup issues
    By telescop in forum Administrators
    Replies: 3
    Last Post: 03-01-2007, 05:09 PM
  5. Backup issues in the Network Edition
    By john99 in forum Administrators
    Replies: 3
    Last Post: 08-17-2006, 09:16 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
  •