Solved

Can't find Zimbra backup script in Ubuntu 8

Posted on 2011-02-10
9
1,157 Views
Last Modified: 2012-05-11
I have a client that is running Ubuntu on 2 of his servers.  One is their mail server which  is zimbra 6 running on  linux Ubuntu 8.  I have no previous experience with linux and only know what I have been able to google on CLI commands and the use of Winscp to look at files.  My problem is that I can't find the script that is backing up the zimbra mail files each night.  I know it is there somewhere because I get a backup folder with files created at 12:30 am each night.  From my reading I have learned that scripts like this should run from cron.  But there is no script in the cron folders (daily,weekly,monthly,etc) that deal with zimbra.  According the the documentation on the zimbra version, this is the free version and does not include the backup functionality.  And I have not found any scripts in the zimbra folders that look to address backups.  I have looked at all the .sh files I can find and none are backup scripts for zimbra.  
I need to change the location of the backups and set up a deletion scheme to delete backups over X days old.
How can I find out what is creating the backup folders?

 
0
Comment
Question by:chenault68
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 2

Expert Comment

by:reason2009
ID: 34867209
zmbackup should be the command line tool that is run nightly. Here's a link: http://wiki.zimbra.com/wiki/CLI_-_zmbackup_Network_Edition_Only
0
 
LVL 5

Accepted Solution

by:
MCode151 earned 167 total points
ID: 34867863
Think he's saying the free version (su - zimbra, zmcontrol -v doesn't return the string NETWORK) there is no zmbackup, most likely (if whomever setup the backup solution didn't store scripts in folders) you need to check these locations:

crontab -l (that's ell) as the highest level person you have access too

or

as root (so sudo -i)
crontab -l

or

su - zimbra
crontab -l


Probably using one of the methods on http://wiki.zimbra.com/wiki/Open_Source_Edition_Backup_Procedure

0
 
LVL 5

Expert Comment

by:MCode151
ID: 34867898
*should hopefully show you actions being taken or more likely where a script is running from

to modify it's crontab -e
i to insert/edit
escape :wq enter is how you save

Look up 'linux vi editor' if you need help but this doc covers that and more (like how the schedules work, ie those * stars you see everywhere) http://adminschoice.com/crontab-quick-reference
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:chenault68
ID: 34867937
I'm logging in as root.  
crontab -l   returned "no crontab for root"  
Is there a way to check crontab for all users?
0
 

Author Comment

by:chenault68
ID: 34867972
I found a backup script under /opt/backup/.  But it looks to be something that was downloaded from a forum and never implemented because the IP addresses and folder locations are generic, ie not correct for this network.  That is the only thing I have found that references backup for Zimbra.
Again, I am logging in as root.  Not being familiar with linux, I assumed that I could get into files from any user on the server.  If been using either the command line on the linux server or WinSCP on a windows server to look through the different directories.
0
 
LVL 5

Expert Comment

by:MCode151
ID: 34868632
What happens when you 'switch user' to the zimbra account?

sudo -i (if not already root)
su - zimbra
crontab -l
0
 
LVL 2

Assisted Solution

by:reason2009
reason2009 earned 167 total points
ID: 34870892
The crontab  would be under the zimbra account. You could open it directly with a text editor at /var/spool/cron/zimbra
0
 
LVL 6

Assisted Solution

by:de2Zotjes
de2Zotjes earned 166 total points
ID: 34871992
Active crontabs are all kept somewhere under /var/spool/cron. So if you are root something like

grep -r zimbra /var/spool/cron

should get you  a result.
From the name of the file where the hit is found you can determine what user and file are used to perform the backup. Once you know the file location you can edit the file to perform the actions you want.
0
 

Author Comment

by:chenault68
ID: 34873036
Finally found it.  It was under /etc/crontab.  There is an entry in the crontab that executes the previously mentioned backup.sh file I found. The unknown ip that is in it was from an offsite backup that hasn't been used in a while.  Here is the crontab.  I can't figure out why I didn't see this in my
crontab -l    search unless I just overlooked it.  thanks to all for the input.

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user      command
17 *      * * *      root    cd / && run-parts --report /etc/cron.hourly
25 6      * * *      root      test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6      * * 7      root      test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6      1 * *      root      test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
30 0    * * *   root    /opt/zimbraBackup.sh  > /temp/zbackup.log 2>&1
#

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to run file 9 130
Using init script with Systemd: need help crafting unit file 11 169
add some character at the end of line in vi 7 105
ifconfig 4 91
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question