Multiple copies of local schedule backup

Provider: Hetzner.

Virtualization Type: Dedicated server (8CPU/64GB RAM/512GB SSD x2).

System: Centos 7.7.1908.

Installation option:

OLS or Enterprise?
OLS

Installing from official server or mirror server?
official

Replace JS/CSS files to JS Delivr?
no

Install Memcached extension for PHP?
yes

Install LiteSpeed Memcached?
yes

Install Memcached?
yes

Install Redis extension for PHP?
yes

Install Redis?
yes

Problem:
When I setup a schedule local backup, it runs multiple times for the same website (Usually x3 copies for each website), and even after removing the local backup from CyberPanel it is still making backup with the same problem: multiple copies of each website. I think this begin to happen after upgrading to the latest CyberPanel version (1.9.2).
Unfortunately, I can’t reproduce the problem because it is a production sever.
Any fix to this problem? It is consuming my disk space especially without any option to delete old backup and remain just last 3 backups for example, so I must remove backups manually every day. I also need a way to edit the time of schedule backup, I think this should be added as an option to CyberPanel.

All sorts of backup (manual,scheduled,remote) have been bad since v1.8.X

Eventually I took to /etc/crontab to add my own commands. Problem with this is that it isn’t done in Cyberpanel format, so restore in remote panel is well, manual.

There might be some clues in /etc/crontab

Backup is done at 3:00 hrs.

I was running local schedule backup with v. 1.9.1 and it was just fine, but now after upgrading to 1.9.2 there is this issue. I can’t find any cron job related to local buckup.

Any reply from one of CyberPanel team please?

This is an example of local backup log file for one website (domain.com as example). You can see that the backup process is running x3 time for this website, and so on for others:
`
[11.22.2019_02-00-01] #################################################
[11.22.2019_02-00-01] Local Backup log for: 11.22.2019_02-00-01
[11.22.2019_02-00-01] #################################################
[11.22.2019_02-00-01] #################################################

[11.22.2019_02-00-01] Local Backup log for: 11.22.2019_02-00-01
[11.22.2019_02-00-01]
[11.22.2019_02-00-01] #################################################

[11.22.2019_02-00-01]
[11.22.2019_02-00-01]
[11.22.2019_02-00-01]
[11.22.2019_02-00-01] Starting local backup for: domain.com
[11.22.2019_02-00-01] Starting local backup for: domain.com
[11.22.2019_02-00-01] #################################################
[11.22.2019_02-00-01] Local Backup log for: 11.22.2019_02-00-01
[11.22.2019_02-00-01] #################################################

[11.22.2019_02-00-01]
[11.22.2019_02-00-01]
[11.22.2019_02-00-01] Starting local backup for: domain.com
[11.22.2019_02-00-04] Waiting for backup to complete…
[11.22.2019_02-00-04] Waiting for backup to complete…
[11.22.2019_02-00-04] Waiting for backup to complete…
[11.22.2019_02-04-04] Backup Completed for: domain.com
[11.22.2019_02-04-04] Backup Completed for: domain.com
[11.22.2019_02-04-04] Backup Completed for: domain.com
`

please give me output of cat /etc/crontab

Hi. Thank you for your reply. I think you guide me directly to the problem! I searched a lot for the file where CyberPanel cron jobs are stored but I was looking in the wrong place (I was looking for a folder called crontab not a file :smile: )
Here is the content of crontab file:
`
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

For details see man 4 crontabs

Example of job definition:

.---------------- minute (0 - 59)

| .------------- hour (0 - 23)

| | .---------- day of month (1 - 31)

| | | .------- month (1 - 12) OR jan,feb,mar,apr …

| | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat

| | | | |

* * * * * user-name command to be executed

0 * * * * root python /usr/local/CyberCP/plogical/findBWUsage.py
0 * * * * root /usr/local/CyberCP/postfixSenderPolicy/client.py hourlyCleanup
0 0 1 * * root /usr/local/CyberCP/postfixSenderPolicy/client.py monthlyCleanup
0 2 * * * root /usr/local/CyberCP/plogical/upgradeCritical.py
0 12 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/IncBackups/IncScheduler.py Daily
0 0 * * 0 root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/IncBackups/IncScheduler.py Daily
0 3 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupScheduleLocal.py

0 3 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupScheduleLocal.py

0 3 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupScheduleLocal.py

0 4 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupScheduleLocal.py
`
I can see that the cron job for backupScheduleLocal.py is duplicated, so I will delete duplicated lines. I will let the last job because I have edited the time of it to 4am.
What do you think? Why it was duplicated? Maybe because of the upgrade process? Especially maybe because I have re-upgraded CyberPanel 2 times to fix some issues.

This is the content of crontab file after deleting duplicated cron jobs:
`
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

For details see man 4 crontabs

Example of job definition:

.---------------- minute (0 - 59)

| .------------- hour (0 - 23)

| | .---------- day of month (1 - 31)

| | | .------- month (1 - 12) OR jan,feb,mar,apr …

| | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat

| | | | |

* * * * * user-name command to be executed

0 * * * * root python /usr/local/CyberCP/plogical/findBWUsage.py
0 * * * * root /usr/local/CyberCP/postfixSenderPolicy/client.py hourlyCleanup
0 0 1 * * root /usr/local/CyberCP/postfixSenderPolicy/client.py monthlyCleanup
0 2 * * * root /usr/local/CyberCP/plogical/upgradeCritical.py
0 12 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/IncBackups/IncScheduler.py Daily
0 0 * * 0 root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/IncBackups/IncScheduler.py Daily
0 4 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupScheduleLocal.py
`
Is that right?

Should be fine now, will not run multiple times now.

Yes, but I don’t know why this happen.
Thank you so much for your support.