[GH-ISSUE #161] Cron Job doesn't appear to be backing up correctly #129

Open
opened 2026-02-27 08:14:29 +03:00 by kerem · 4 comments
Owner

Originally created by @jimgrove1985 on GitHub (May 14, 2021).
Original GitHub issue: https://github.com/lucascbeyeler/zmbackup/issues/161

ISSUE TYPE: Bug Report / Question (as this may be user error on my part)

ENVIRONMENT VERSION:

  • Zmbackup Version: 1.2.6
  • Zimbra Version: 8.8.15_GA_4018.FOSS
  • Linux Distribution & Version: CentOS 7.9.2009 Core

SUMMARY:
If I manually run the "zmbackup -f" command as the user: zimbra, a complete backup appears to be created of all accounts on my mail server and it produces a full backup of around 3.4GB.
However, leaving the /etc/cron.d/zmbackup file to do it's thing does not produce the same results. For example, if I delete all existing backups using the zmbackup -d command and then leave the backup to run via cron overnight, it only appears to create a full backup of 45MB

Originally created by @jimgrove1985 on GitHub (May 14, 2021). Original GitHub issue: https://github.com/lucascbeyeler/zmbackup/issues/161 ISSUE TYPE: Bug Report / Question (as this may be user error on my part) ENVIRONMENT VERSION: - Zmbackup Version: 1.2.6 - Zimbra Version: 8.8.15_GA_4018.FOSS - Linux Distribution & Version: CentOS 7.9.2009 Core SUMMARY: If I manually run the "zmbackup -f" command as the user: zimbra, a complete backup appears to be created of all accounts on my mail server and it produces a full backup of around 3.4GB. However, leaving the /etc/cron.d/zmbackup file to do it's thing does not produce the same results. For example, if I delete all existing backups using the zmbackup -d command and then leave the backup to run via cron overnight, it only appears to create a full backup of 45MB
Author
Owner

@killmasta93 commented on GitHub (May 17, 2021):

could you show me your cron job

<!-- gh-comment-id:842688139 --> @killmasta93 commented on GitHub (May 17, 2021): could you show me your cron job
Author
Owner

@jimgrove1985 commented on GitHub (May 18, 2021):

Strangely it looks like it may be working fine now.

I have just checked the backups and it generated a new full backup on Sunday, which is as to be expected based on the cron job settings and this was the expected full size.

I shall keep an eye on things for now and report back if I notice anything unexpected

<!-- gh-comment-id:843094374 --> @jimgrove1985 commented on GitHub (May 18, 2021): Strangely it looks like it may be working fine now. I have just checked the backups and it generated a new full backup on Sunday, which is as to be expected based on the cron job settings and this was the expected full size. I shall keep an eye on things for now and report back if I notice anything unexpected
Author
Owner

@jimgrove1985 commented on GitHub (May 23, 2021):

OK, so I've left it running for a few days now and something definitely does not seem correct.

Here is the output of zmbackup -l ran under the zimbra user:

+---------------------------+--------------+--------------+----------+----------------------------+
| Session Name | Start | Ending | Size | Description |
+---------------------------+--------------+--------------+----------+----------------------------+
| alias-20210516003002 | 05/16/2021 | 05/16/2021 | 8.0K | Alias |
| full-20210516013001 | 05/16/2021 | 05/16/2021 | 3.4G | Full Account |
| alias-20210518003001 | 05/18/2021 | 05/18/2021 | 8.0K | Alias |
| inc-20210518013001 | 05/18/2021 | 05/18/2021 | 3.0M | Incremental Account |
| inc-20210519013001 | 05/19/2021 | 05/19/2021 | 8.0K | Incremental Account |
| alias-20210520003001 | 05/20/2021 | 05/20/2021 | 8.0K | Alias |
| inc-20210520013001 | 05/20/2021 | 05/20/2021 | 2.8M | Incremental Account |
| inc-20210521013001 | 05/21/2021 | 05/21/2021 | 8.0K | Incremental Account |
| alias-20210522003001 | 05/22/2021 | 05/22/2021 | 8.0K | Alias |
| inc-20210522013001 | 05/22/2021 | 05/22/2021 | 4.6M | Incremental Account |
| full-20210523013001 | 05/23/2021 | 05/23/2021 | 516M | Full Account |
+---------------------------+--------------+--------------+----------+----------------------------

I am using the standard cron job file that is created when installing zmbackup.
It looks like this:

                         ZMBACKUP CRON FILE                              

This file is used to manage the time and day each backup activity will be
executed. Please modify this file rather than create a new one.
Default values for each activity:
Full Backup: Every Sunday at 1:30 AM
Incremental: From Monday to Saturday at 1:30 AM
Alias: Every day at 0:30 AM
Distribution List: Every day at 1 AM
Backup Rotation: Every day at Midnight

                         ZMBACKUP VARIABLES                              

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
#MAILTO=root
30 1 * * 0 zimbra zmbackup -f
0 1 * * * zimbra zmbackup -f -dl
30 0 * * * zimbra zmbackup -f -al
30 1 * * 1-6 zimbra zmbackup -i
0 0 * * * zimbra zmbackup -hp

                      ZMBACKUP - OTHER OPTIONS                           

Mailbox Backup: Every day at 1:30AM
LDAP Backup: Every day at 1:00AM

30 1 * * * zimbra zmbackup -f -ldp
30 1 * * 0 zimbra zmbackup -f -m

<!-- gh-comment-id:846600183 --> @jimgrove1985 commented on GitHub (May 23, 2021): OK, so I've left it running for a few days now and something definitely does not seem correct. Here is the output of zmbackup -l ran under the zimbra user: +---------------------------+--------------+--------------+----------+----------------------------+ | Session Name | Start | Ending | Size | Description | +---------------------------+--------------+--------------+----------+----------------------------+ | alias-20210516003002 | 05/16/2021 | 05/16/2021 | 8.0K | Alias | | full-20210516013001 | 05/16/2021 | 05/16/2021 | 3.4G | Full Account | | alias-20210518003001 | 05/18/2021 | 05/18/2021 | 8.0K | Alias | | inc-20210518013001 | 05/18/2021 | 05/18/2021 | 3.0M | Incremental Account | | inc-20210519013001 | 05/19/2021 | 05/19/2021 | 8.0K | Incremental Account | | alias-20210520003001 | 05/20/2021 | 05/20/2021 | 8.0K | Alias | | inc-20210520013001 | 05/20/2021 | 05/20/2021 | 2.8M | Incremental Account | | inc-20210521013001 | 05/21/2021 | 05/21/2021 | 8.0K | Incremental Account | | alias-20210522003001 | 05/22/2021 | 05/22/2021 | 8.0K | Alias | | inc-20210522013001 | 05/22/2021 | 05/22/2021 | 4.6M | Incremental Account | | full-20210523013001 | 05/23/2021 | 05/23/2021 | 516M | Full Account | +---------------------------+--------------+--------------+----------+---------------------------- I am using the standard cron job file that is created when installing zmbackup. It looks like this: ZMBACKUP CRON FILE This file is used to manage the time and day each backup activity will be executed. Please modify this file rather than create a new one. Default values for each activity: Full Backup: Every Sunday at 1:30 AM Incremental: From Monday to Saturday at 1:30 AM Alias: Every day at 0:30 AM Distribution List: Every day at 1 AM Backup Rotation: Every day at Midnight ZMBACKUP VARIABLES SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin #MAILTO=root 30 1 * * 0 zimbra zmbackup -f 0 1 * * * zimbra zmbackup -f -dl 30 0 * * * zimbra zmbackup -f -al 30 1 * * 1-6 zimbra zmbackup -i 0 0 * * * zimbra zmbackup -hp ZMBACKUP - OTHER OPTIONS Mailbox Backup: Every day at 1:30AM LDAP Backup: Every day at 1:00AM 30 1 * * * zimbra zmbackup -f -ldp 30 1 * * 0 zimbra zmbackup -f -m
Author
Owner

@killmasta93 commented on GitHub (May 26, 2021):

change you see inside of the full-20210516013001
run ls -l -h to see which emails were backup

and
full-20210523013001

<!-- gh-comment-id:848361561 --> @killmasta93 commented on GitHub (May 26, 2021): change you see inside of the full-20210516013001 run `ls -l -h` to see which emails were backup and full-20210523013001
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/zmbackup#129
No description provided.