Cron Daemon - Error reseller backup

fossie

Verified User
Joined
Dec 7, 2006
Messages
45
Location
Belgium
Hello,

From one of the cron'd reseller backups, I recieve every day an email (except a few days last two months)

Subject: echo -e "action=backup&id=2&owner=fossieniel" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da

body:
/bin/chmod: cannot access `/usr/local/directadmin/data/task.queue.da': No such file or directory

I've already changed the time to do the backup, but that didn't change anything. This results in NOT backing up the reseller, so I'll have to do it everyday manually.

The other reseller backups run, no error in cron.

How can I solve this problem? Where should I have to look?

DA: 1.32.2
CentOS: 5.0 (64-bit) box is upgraded to 5.2

TIA,
Fossie
 
/etc/cron.d/directadmin_cron is using /usr/local/directadmin/data/task.queue and not /usr/local/directadmin/data/task.queue.da, task.queue.da is used by /var/spool/cron/diradmin. Make sure you are able to write to the files manually.
 
Last edited:
It doesnt matter >> will write out a new file. If it cant write to the folder then there is a problem with the parent folder.
 
I don't see why it can't be
/usr/local/directadmin/data/task.queue.da

If I check the logs of cron; the other reseller backup cron requests are written to the same file:

Aug 18 04:00:01 anelfo crond[770]: (diradmin) CMD (echo -e "action=backup&id=1&owner=bartdv02" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da)
handled correctly

Aug 18 04:25:01 anelfo crond[25138]: (diradmin) CMD (echo -e "action=backup&id=2&owner=fossieniel" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da)
didn't work and sended out the error

I didn't change anything and I didn't choose to write to task.queue.da, this is done the normal way, on the reseller page, I've choosen (both resellers) to backup some accounts, Cron them at a certain time and point where to put them.

So if I should change the filename, where can I do this?
If I don't have to change the filename, why is the first backup ok and the second wrong?

I've read somewhere in a very old thread that the task.queue.da can be deleted due some reason, because dataskq is executed before the chmod, but I don't see any place to prevent that.

http://www.directadmin.com/forum/showthread.php?t=8425

Any help is welcome,
Fossie
 
Last edited:
Sorry, yes, you are right :) Please post an output of:
Code:
ls -l /usr/local/directadmin | grep data
 
Output of ls -l

[root@anelfo ~]# ls -l /usr/local/directadmin | grep data
drwx--x--x 8 diradmin diradmin 4096 Aug 20 12:02 data
-rwx------ 1 diradmin diradmin 2952582 Jul 26 13:12 dataskq
 
You can change the taskqueue name also with the taskqueue variable in /usr/local/directadmin/conf/directadmin.conf maybe he did that as well.

Here is my output:

[root@venom:~] ls -l /usr/local/directadmin | grep data
drwx--x--x 8 diradmin diradmin 512 Aug 20 06:02 data
-rwx------ 1 diradmin diradmin 4211633 Jul 15 08:34 dataskq

If you want to compare :D
 
In directadmin.conf

taskqueue=/usr/local/directadmin/data/task.queue

I didn't change (manually) settings in this file.
 
chatwizrd, DA uses task.queue.da by default too, it's set in /var/spool/cron/diradmin :)
 
This is the output /var/spool/cron/diradmin

0 4 * * * echo -e "action=backup&id=1&owner=bartdv02" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
25 4 * * * echo -e "action=backup&id=2&owner=fossieniel" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da

Does this help?
 
Did you run the commands manually and see if they execute ok. Maybe you need the path to echo command?
 
What do I have to echo? Where?

This one? (I mean
echo -e "action=backup&id=2&owner=fossieniel" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
 
Should I change it in : /var/spool/cron/diradmin

because I don't have control over the output of the cron I've create at the reseller page.
 
Yes change it there. This is probably the reasons it is not doing the echo because it cannot find the path to echo command and then it is only running the chmod command.

The way to change it would be like this:

/bin/echo -e "action=backup&id=2&owner=fossieniel" >> /usr/local/directadmin/data/task.queue.da && /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
 
That seems to work (changed also the hour, manually to test), but I'm not sure how to setup using the interface to test, because I changed it manually and when I update it at reseller level interface, it's overwritten.

So how can I test it, using the interface?
 
Back
Top