CRON Backup still running after being deleted

quadium

Verified User
Joined
Sep 29, 2007
Messages
44
Hey guys,

After enormous bandwidth consumption, we decided to delete a CRON backup (User Backups) on the Reseller level which transferred the backups off-site.

We've since deleted the task, but it still runs. We disconnected the receiving server to stop the bandwidth consumption and obviously now it keeps failing the FTP transfers... but there is no CRON job anymore so it's not supposed to be backing up in the first place.

Question 1: How could this happen? DA is obviously not aware that this is scheduled, aside from the failed backup messages via the ticket system.

Question 2: Is there a way to manually delete this CRON job inside CentOS? I tried searching online, but all I get is how to schedule CRON jobs, and looking at the CRON jobs scheduled it must be inside the DirectAdmin task Queue, as there's not much else in there.

That leads to Question 3: Is there a way to manually review the DA task Queue and delete this task?

Thanks in advance.
 
Last edited:
If it is a cron job, then as root or admin (which ever user is running the job) execute the command 'crontab -l' and it will list all the scheduled cron jobs for that user. If there aren't any, then it might be kicked off differently. You should be able to see all user crontabs by looking in /var/spool/cron , a quick grep should find that job.
 
Thanks Toml,

This is what I found:

[root@srv001c cron]# cat diradmin
0 0 * * * echo -e "action=backup&id=4&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
0 3 * * * echo -e "action=backup&id=1&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
0 5 * * * echo -e "action=backup&id=2&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da

So I removed the two other backups which would probably include the erroneous additional FTP backup. I'll find out this morning!

Thanks for your help! Questions is, why couldn't DA see that there were additional backups in CRON? Obviously DA thought it had removed them... but hadn't.
 
I had the same issue, I had to remove them manually as I had two backups running at the same time killing the server, although DA only saw and reported one of them.
 
Important to remember:

Removing a cronjob from a file doesn't stop it if it's already running.

Killing any excecutible by removing the file from the disk doesn't stop it from running in memory.

Jeff
 
on a sidenote for this topic, it will be wise to keep the backups running, if not daily at least weekly, you don't want to find yourself without offsite backups you know...

bandwidth costs are nothing in contrast to data loss.
 
One of the things I don't like about DA is that you don't seem to be able to check what settings you have for backups, only create new ones.

I look in that file and I see :-

0 5 * * 0,3,6 echo -e "action=backup&id=1&owner=cust" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da

So, that's good... only question is, which of the 3 places I could use for backups did I tell it to FTP the files to?

How do I find that out?

And if I set up a new one, to ensure it's in the right place, will I then have two?

Sean
 
Back
Top