1 (edited by schnappi 2015-02-18 05:25:54)

Topic: Cron SQL backups ever purged?

First off great product!

Just installed. Saw some "cron_backup_sql" jobs in the admin log. Know how to edit cron jobs.

Question however is how often are these backups purged (if ever)?

----

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

2

Re: Cron SQL backups ever purged?

Unfortunately, the backup script doesn't remove old backup copies. Will try to improve it in the future.

3

Re: Cron SQL backups ever purged?

Hello Huangbin,
Do you ahve any news or just a link that could help me clean my backups folder please ? smile

Thanks in advance !

4

Re: Cron SQL backups ever purged?

You can download 'tools/backup_mysql.sh' in iRedMail-0.9.1-beta1, it will remove old backups (90 days by default).

Note: it just removes files which ARE 90 days old (just one day), it won't remove files OLDER than 90 days.

5

Re: Cron SQL backups ever purged?

Great to know. One can also change the correct MySQL login information to bad MySQL login information in the following file (Ubuntu/ Debian base) /var/vmail/backup/backup_mysql.sh

This way the backup won't run.

Have been using this solution in the short term.

6

Re: Cron SQL backups ever purged?

schnappi wrote:

One can also change the correct MySQL login information to bad MySQL login information in the following file (Ubuntu/ Debian base) /var/vmail/backup/backup_mysql.sh
This way the backup won't run.

Why not disable the cron job?

7

Re: Cron SQL backups ever purged?

To be honest don't know how to do so.

8

Re: Cron SQL backups ever purged?

crontab -e
as root
and put a comment "#" infront of the line that includes the word backup_mysql.sh

9

Re: Cron SQL backups ever purged?

Cool. Easy.

# 30   3   *   *   *   /bin/bash /var/vmail/backup/backup_mysql.sh

10

Re: Cron SQL backups ever purged?

Wasn't sure if cron jobs ran per user or per system. It seems all cron jobs run per system and need root permissions.

11

Re: Cron SQL backups ever purged?

some cronjobs run as specific users, I believe so anyway; I think sogo has its own user run its cron jobs for example.

12

Re: Cron SQL backups ever purged?

You can check certain user's cron job with command 'crontab -l -u [user]' (replace [user] by the real user name, e.g. root, sogo).

13

Re: Cron SQL backups ever purged?

ZhangHuangbin wrote:

You can download 'tools/backup_mysql.sh' in iRedMail-0.9.1-beta1, it will remove old backups (90 days by default).

Note: it just removes files which ARE 90 days old (just one day), it won't remove files OLDER than 90 days.

Thanks ! doing the job as expected, golden support as usual smile