1 (edited by alex42 2016-01-14 22:23:27)

Topic: Deleting old backup-files automatically

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Ubuntu 14.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Hallo,

I've realized today that a lot of backups are stored by iredmail (iredmail is making for example each day a backup of our LDAP-tree (each day 120M)).
I would like to delete them using this command in a daily cron job:

find /var/vmail/backup/ -mtime +30 -delete

Or are there any reasons why I shouldn't do this?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Deleting old backup-files automatically

Providing you are using the supplied script from IredMail (/var/vmail/backup/backup_openldap.sh) you can accomplish this by configuring the variable 'KEEP_DAYS' in the script.

3

Re: Deleting old backup-files automatically

Thanks a lot!

4

Re: Deleting old backup-files automatically

I've got another question: Do I have to delete the backup files produced by the skript before I've changed the settings? Or will they get deleted the next days?

5 (edited by mir 2016-01-16 06:25:31)

Re: Deleting old backup-files automatically

alex42 wrote:

I've got another question: Do I have to delete the backup files produced by the skript before I've changed the settings? Or will they get deleted the next days?

You will need to delete files prior to KEEP_DAYS + 1 manually.