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 01-08-2011, 02:17 AM
Junior Member
 
Posts: 9
Default Backup - store folder increase rapidly

Hello
I have the follow problem in backup.
I take a full backup in weekly basis (stop all zimbra services and copy /opt/zimbra to another folder), but the size of store folder of backup is much larger that the real one.

Real store folder: 22G ./zimbra/store
Buckup store folder: 164G ./zimbra/store

As a result, i have problem with disk space.

Does anybody know why that happens ?
Reply With Quote
  #2 (permalink)  
Old 01-08-2011, 02:44 AM
Zimbra Consultant & Moderator
 
Posts: 20,315
Default

You need to update your forum profile with the output of the following command (do not post the output in this thread):

Code:
zmcontrol -v
Quote:
Originally Posted by Nikos Lyberakis View Post
Hello
I have the follow problem in backup.
I take a full backup in weekly basis (stop all zimbra services and copy /opt/zimbra to another folder), but the size of store folder of backup is much larger that the real one.

Real store folder: 22G ./zimbra/store
Buckup store folder: 164G ./zimbra/store

As a result, i have problem with disk space.

Does anybody know why that happens ?
Not really, you need to give more details on what method you're using to backup your Zimbra server.
__________________
Regards


Bill
Reply With Quote
  #3 (permalink)  
Old 01-08-2011, 04:34 AM
Junior Member
 
Posts: 9
Default

I use the follow script....

#!/bin/bash

# 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/ /backup/zimbra

# Remove old backup files - nikos
echo "Remove old backup files"
rm -Rf /backup/*

# which is the same as: /opt/zimbra /backup
# Including --delete option gets rid of files in the dest folder that don't exist at the src
# this prevents logfile/extraneous bloat from building up overtime.

# 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
echo "Stop Zimbra Services"
su - zimbra -c"/opt/zimbra/bin/zmcontrol stop"
sleep 25

# Kill any orphaned Zimbra processes
echo "Kill any orphaned Zimbra processes"
kill -9 `ps -u zimbra -o "pid="`

# Only enable the following command if you need all Zimbra user owned
# processes to be killed before syncing
# ps auxww | awk '{print $1" "$2}' | grep zimbra | kill -9 `awk '{print $2}'`

# Copy to backup directory
echo "Copy to backup directory"
cp -Rp /opt/zimbra /backup

sleep 60
# Restart Zimbra Services
echo "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"
Reply With Quote
  #4 (permalink)  
Old 01-08-2011, 05:03 AM
Zimbra Consultant & Moderator
 
Posts: 20,315
Default

As far as I'm aware, there should be no reason that your destination folder should have 'grown' that large by using that script. Have you done a comparison of the original directories and the destination ones to see if they're the same or what the differences are?
__________________
Regards


Bill
Reply With Quote
  #5 (permalink)  
Old 01-08-2011, 05:11 AM
Junior Member
 
Posts: 9
Default

Below is the comparison.... as you can see, the big difference is in store folder

////////////////Zimbra folder
root@gavdos:/opt# du -h --max-depth=2
2.1M ./zimbra/zimlets-deployed
2.7M ./zimbra/dspam-3.9.0
33M ./zimbra/heimdal-1.3.1
268K ./zimbra/altermime-0.3-dev
39M ./zimbra/openldap-data
828K ./zimbra/save-07012009
488K ./zimbra/zimlets
72K ./zimbra/wiki
16K ./zimbra/.ssh
656K ./zimbra/bin
4.4M ./zimbra/conf
16K ./zimbra/cyrus-sasl-2.1.22.3z
127M ./zimbra/log
636K ./zimbra/zimlets-experimental
48K ./zimbra/zimlets-admin-extra
24M ./zimbra/net-snmp-5.5
2.6M ./zimbra/memcached-1.4.4
12K ./zimbra/contrib
5.6M ./zimbra/tcmalloc-1.5
12K ./zimbra/net-snmp-5.4.1
688M ./zimbra/zmstat
4.0K ./zimbra/fbqueue
40M ./zimbra/jetty-6.1.5
2.3G ./zimbra/index
113M ./zimbra/aspell-0.60.6
18M ./zimbra/redolog
5.3M ./zimbra/cyrus-sasl-2.1.23.3z
96M ./zimbra/mysql-standard-5.0.90-pc-linux-gnu-i686-glibc23
1.5M ./zimbra/amavisd-new-2.6.4
4.0K ./zimbra/convertd
28M ./zimbra/openssl-0.9.8n
22G ./zimbra/store
37M ./zimbra/lib
1.1G ./zimbra/data
70M ./zimbra/bdb-4.7.25.4
19M ./zimbra/openldap-2.4.21.7z
1.9M ./zimbra/libexec
4.0M ./zimbra/nginx-0.5.37-zimbra
2.1M ./zimbra/curl-7.20.0
418M ./zimbra/jetty-6.1.22.z6
52K ./zimbra/postfix-2.4.7.5z
72K ./zimbra/jetty-6.1.22.z5
195M ./zimbra/jdk1.6.0_16
912K ./zimbra/docs
31M ./zimbra/postfix-2.6.5.2z
53M ./zimbra/clamav-0.95.3
1.7M ./zimbra/ssl
2.5M ./zimbra/.saveconfig
41M ./zimbra/zimbramon
4.0K ./zimbra/backup
42M ./zimbra/logger
40M ./zimbra/httpd-2.2.14
1.7G ./zimbra/db
700K ./zimbra/zimlets-extra
2.6M ./zimbra/libtool-2.2.6b
29G ./zimbra


////////////////Backup folder
root@gavdos:/backup# du -h --max-depth=2
8.0K ./.ssh
2.1M ./zimbra/zimlets-deployed
2.7M ./zimbra/dspam-3.9.0
42M ./zimbra/heimdal-1.3.1
268K ./zimbra/altermime-0.3-dev
39M ./zimbra/openldap-data
828K ./zimbra/save-07012009
488K ./zimbra/zimlets
72K ./zimbra/wiki
16K ./zimbra/.ssh
656K ./zimbra/bin
4.4M ./zimbra/conf
16K ./zimbra/cyrus-sasl-2.1.22.3z
125M ./zimbra/log
636K ./zimbra/zimlets-experimental
48K ./zimbra/zimlets-admin-extra
24M ./zimbra/net-snmp-5.5
2.6M ./zimbra/memcached-1.4.4
12K ./zimbra/contrib
5.6M ./zimbra/tcmalloc-1.5
12K ./zimbra/net-snmp-5.4.1
787M ./zimbra/zmstat
4.0K ./zimbra/fbqueue
40M ./zimbra/jetty-6.1.5
2.3G ./zimbra/index
113M ./zimbra/aspell-0.60.6
12K ./zimbra/redolog
5.3M ./zimbra/cyrus-sasl-2.1.23.3z
96M ./zimbra/mysql-standard-5.0.90-pc-linux-gnu-i686-glibc23
1.5M ./zimbra/amavisd-new-2.6.4
4.0K ./zimbra/convertd
28M ./zimbra/openssl-0.9.8n
164G ./zimbra/store
37M ./zimbra/lib
1.1G ./zimbra/data
70M ./zimbra/bdb-4.7.25.4
19M ./zimbra/openldap-2.4.21.7z
1.9M ./zimbra/libexec
4.0M ./zimbra/nginx-0.5.37-zimbra
2.1M ./zimbra/curl-7.20.0
428M ./zimbra/jetty-6.1.22.z6
52K ./zimbra/postfix-2.4.7.5z
72K ./zimbra/jetty-6.1.22.z5
195M ./zimbra/jdk1.6.0_16
912K ./zimbra/docs
33M ./zimbra/postfix-2.6.5.2z
53M ./zimbra/clamav-0.95.3
1.7M ./zimbra/ssl
2.5M ./zimbra/.saveconfig
41M ./zimbra/zimbramon
4.0K ./zimbra/backup
42M ./zimbra/logger
40M ./zimbra/httpd-2.2.14
1.7G ./zimbra/db
700K ./zimbra/zimlets-extra
2.6M ./zimbra/libtool-2.2.6b
171G ./zimbra
Reply With Quote
  #6 (permalink)  
Old 01-08-2011, 05:33 AM
Zimbra Consultant & Moderator
 
Posts: 20,315
Default

Quote:
Originally Posted by Nikos Lyberakis View Post
Below is the comparison.... as you can see, the big difference is in store folder
I don't dispute that the size of the folder is different but have you actually done a comparison of the files in those directory structure to see what, exactly, the difference is? Does the backup store folder contain additional files, are they older, are they large than the original i.e. what actually is consuming the space in the store folder?
__________________
Regards


Bill
Reply With Quote
  #7 (permalink)  
Old 01-08-2011, 06:22 AM
Moderator
 
Posts: 1,554
Default

i don't understand why your script does an rsync pre-shutdown, but a copy post-shutdown. i would think that would copy *all* of /opt/zimbra to /backup instead of just what's changed. it seems like you should just do another rsync.
Reply With Quote
  #8 (permalink)  
Old 01-09-2011, 11:26 PM
Elite Member
 
Posts: 469
Default

Your Zimbra message store seems the obvious place to start looking ...

22G ./zimbra/store

164G ./zimbra/store

That is almost 8x as large.
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.