database huge, disk full

About Zarafa appliance or Zarafa managed by Artica

database huge, disk full

New postby frater » Sun May 25, 2014 7:22 am

I have my Artica on automatic updating for nightly builds....

A while ago I noticed that Artica all of a sudden started to create back-ups that were quite significant in size.
I went to Artica's WebIF and tried to find where it is set.
I couldn't find it (I can't find anything in this new interface), so I created a cronjob that would delete these...

# cat /etc/cron.daily/remove-oldbackups
Code: Select all
#!/bin/sh
find /home/zarafa-backup/ -mindepth 1  -maxdepth 1 -type d -mtime +1 | egrep '/[0-9]+$' | xargs -I{} rm -r {}


Longer ago I already moved my mysql database to another partition (9 GB):
Code: Select all
# grep mysql /etc/fstab
UUID=8a793d88-7c6b-4e4d-a143-082ecd8af4b3       /var/lib/mysql  ext4    rw,noatime,errors=remount-ro    0       1


Last week it grew until that partition was completely full
I noticed there were a lot of .BAK files. I removed these and I'm back in play with 2.2 GB more space.
I still think it's wasting space. I have 2 accounts on it and the actual mail can't be more than 2 GB.
frater
 
Posts: 127
Joined: Sun Jul 08, 2012 9:35 am
Artica servers number: 1
Linux System: Debian
Technical skills: A Linux System Administrator

Re: database huge, disk full

New postby admin » Sun May 25, 2014 8:51 am

.BAK files is bak tables used when recover tables.
You are right, these files can be removed
User avatar
admin
Site Admin
 
Posts: 11946
Joined: Wed Oct 17, 2007 7:59 am
Location: France

Re: database huge, disk full

New postby frater » Sun May 25, 2014 7:36 pm

But this is really quite new....
This server is running for years and this is suddenly happening.
I can provide you graphs...

This morning I removed all *.BAK and now (in the evening I have to do it again...)

Code: Select all
root@zarafa64:~# df -h /var/lib/mysql
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda7     ext4    9.9G  9.5G     0 100% /var/lib/mysql
root@zarafa64:~# find /var/lib/mysql -type f -name \*.BAK -exec rm -rf {} \;
root@zarafa64:~# df -h /var/lib/mysql
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda7     ext4    9.9G  7.3G  2.1G  78% /var/lib/mysql
frater
 
Posts: 127
Joined: Sun Jul 08, 2012 9:35 am
Artica servers number: 1
Linux System: Debian
Technical skills: A Linux System Administrator

Re: database huge, disk full

New postby admin » Sun May 25, 2014 7:46 pm

can you list all BAK files before removing them
User avatar
admin
Site Admin
 
Posts: 11946
Joined: Wed Oct 17, 2007 7:59 am
Location: France

Re: database huge, disk full

New postby frater » Thu May 29, 2014 7:36 am

Sorry for my late reply.
I had some other issues and wrote an hourly cronjob to remove all .BAK files.

Soon I will stop that job and check out these files
frater
 
Posts: 127
Joined: Sun Jul 08, 2012 9:35 am
Artica servers number: 1
Linux System: Debian
Technical skills: A Linux System Administrator


Return to Zarafa mail server

Who is online

Users browsing this forum: No registered users and 4 guests

cron