Admin remote ftp backup cron jobs not working!

aros

Verified User
Joined
Jan 12, 2017
Messages
28
In the Admin Backup/Transfer section, I've created some backup cron jobs.
In the same section under Create Backup, if I choose the "Now" option it will run the selected ftp remote backup job successfully.
But the cron jobs are not running at night.
a cron job log:
Nov 13 22:00:01 server CROND[28283]: (diradmin) CMD (echo "action=backup&id=5&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da)

How to fix it?

DA Version1.63.9
Detected server OSrhel7_amd64
 
Last edited:
Hello,

Make sure crond is installed and running:

Code:
# rpm -qa | grep cron
crontabs-1.11-6.20121102git.el7.noarch
cronie-anacron-1.4.11-24.el7_9.x86_64
cronie-1.4.11-24.el7_9.x86_64

Code:
# systemctl status crond
● crond.service - Command Scheduler
   Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2022-11-13 21:34:21 +07; 5 days ago
 Main PID: 646 (crond)
   CGroup: /system.slice/crond.service
           └─646 /usr/sbin/crond -n
 
Hello,
The crond already installed and works

[root@server ~]# rpm -qa | grep cron
cronie-anacron-1.4.11-24.el7_9.x86_64
crontabs-1.11-6.20121102git.el7.noarch
cronie-1.4.11-24.el7_9.x86_64
[root@server ~]# systemctl status crond
● crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-11-17 11:02:45 +0000; 2 days ago
Main PID: 878 (crond)
CGroup: /system.slice/crond.service
└─878 /usr/sbin/crond -n

Nov 17 11:02:45 server.xxx systemd[1]: Started Command Scheduler.
Nov 17 11:02:45 server.xxx crond[878]: (CRON) INFO (RANDOM_DELAY will be scaled wi....)
Nov 17 11:02:48 server.xxx crond[878]: (CRON) INFO (running with inotify support)
Nov 17 11:02:49 server.xxx crond[878]: 2022-11-17 11:02:49 1ovZOD-0000Ec-2I User 0...st
Nov 17 11:02:49 server.xxx crond[878]: 2022-11-17 11:02:49 1ovZOD-0000GO-2Y User 0...st
Hint: Some lines were ellipsized, use -l to show in full.
[root@server ~]#
 
0 0 * * * echo "action=backup&id=1&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
0 22 * * * echo "action=backup&id=5&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
0 3 * * * echo "action=backup&id=2&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
0 6 * * * echo "action=backup&id=3&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
0 7 * * * echo "action=backup&id=4&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
 
Code:
ls -la /usr/local/directadmin/data/task.queue.da
?

Analyze /var/log/directadmin/error.log and /var/log/directadmin/errortaskq.log for possible related errors
 
at the being time it says
[root@server ~]# ls -la /usr/local/directadmin/data/task.queue.da
ls: cannot access /usr/local/directadmin/data/task.queue.da: No such file or directory
 
cat /var/log/directadmin/errortaskq.log
2022:11:17-00:00:01: service lfd wasn't running, starting lfd
2022:11:17-00:28:02: service da-popb4smtp wasn't running, starting da-popb4smtp
2022:11:17-11:04:02: service da-popb4smtp wasn't running, starting da-popb4smtp
2022:11:18-00:00:02: service lfd wasn't running, starting lfd
2022:11:18-00:19:02: service da-popb4smtp wasn't running, starting da-popb4smtp
2022:11:18-05:39:54: sys::remove_tracked_temporary_files: removed temporary file './data/users/admin/user.action.lock'
2022:11:18-05:39:54: sys::remove_tracked_temporary_files: removed temporary file './data/users/bststrfl/user.action.lock'
2022:11:18-05:39:54: sys::remove_tracked_temporary_files: removed temporary file './data/users/payac/user.action.lock'
2022:11:18-05:39:54: sys::remove_tracked_temporary_files: removed temporary file './data/users/ticketbesa/user.action.lock'
2022:11:19-00:00:02: service lfd wasn't running, starting lfd
[root@server ~]#
 
[root@server ~]# cat /var/log/directadmin/error.log
2022:11:14-21:34:45: unable to stat ./data/users/admin/ticket.conf.temp for filesize after write: euid:996
2022:11:14-21:58:39: Timeout (timeout=600) from 85.9.101.7 : last flagged: Command::doCommand(/CMD_LOG_VIEWER) : getHomeDir : admin : done
2022:11:14-21:58:39: Socket write error: fd is connected to a pipe or socket whose reading end is closed. When this happens the writing process will also receive a SIG_PIPE signal. (Thus, the write return value is seen only if the program catches, blocks or ignores this signal.)
2022:11:16-21:06:26: Socket write error: fd is connected to a pipe or socket whose reading end is closed. When this happens the writing process will also receive a SIG_PIPE signal. (Thus, the write return value is seen only if the program catches, blocks or ignores this signal.)
2022:11:18-22:27:00: ConfigFile::writeFile: Unable to move ./data/users/admin/ticket.conf.temp to ./data/users/admin/ticket.conf : No such file or directory (errno=2)
[root@server ~]#
 
It seems no related error in the /var/log/directadmin/error.log and /var/log/directadmin/errortaskq.log files
 
There is nothing related to failed backups, as well as there are no lines from the time of running backups.
The file /usr/local/directadmin/data/task.queue.da is empty, no errors logged. Thus may I consume backups are running successfully.

By the way, what makes you think the opposite?
 
In the same section under Create Backup, if I choose the "Now" option it will run the selected ftp remote backup job successfully (the tar.gz files are seen in remote host and I receive a successful backup text in the directadmin server messages).
But the cron jobs are not running at night (the tar.gz files are not seen in remote host and I do not receive successful backup text in the directadmin server messages).
 
Last edited:
And what will you see if you run as root the following commands?

Code:
echo "action=backup&id=4&owner=admin" >> /usr/local/directadmin/data/task.queue.da;
/usr/local/directadmin/dataskq d800
 
Quotas set
User::setQuota(0, inodes=0, partition='(null)') user=besatparts
quota command: /usr/sbin/xfs_quota -x -c 'limit -u bsoft=0k bhard=0k isoft=0 ihard=0 besatparts' /home
Quotas set
setOwner:/home/tmp/admin.10068.x6hIFNoJ2jAxa014l4jvdWg3GEGtCP07/br0QZRMLwHtpGnnu0eFvRXWZ13KnzpUb/besatparts/backup/email_data/webmail/besatparts_localhost:to uid=1020 gid=1021: lstat error: No such file or directory
Sockets::getServerIPv6: Script error:
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/user.comments to backup. Skipping.
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/user.history to backup. Skipping.
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/user.security_questions to backup. Skipping.
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/twostep_auth_secret.txt to backup. Skipping.
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/twostep_auth_scratch_codes.list to backup. Skipping.
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/commands.allow to backup. Skipping.
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/commands.deny to backup. Skipping.
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/crontab.conf to backup. Skipping.
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/bandwidth.tally to backup. Skipping.
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/ticket.conf to backup. Skipping.
Backup::copy_backup_file_function: Cannot find /home/besatparts/.shadow to backup. Skipping.
Backup::copy_backup_file_function: Cannot find ./data/users/besatparts/history to backup. Skipping.

2022/12/01 09:02:35 info Backup options={besatparts [] true} userbackuppath=/home/tmp/admin.10068.x6hIFNoJ2jAxa014l4jvdWg3GEGtCP07/br0QZRMLwHtpGnnu0eFvRXWZ13KnzpUb/besatparts/backup
Running backup command: /bin/nice -n 19 /bin/tar cpf - -C /home/tmp/admin.10068.x6hIFNoJ2jAxa014l4jvdWg3GEGtCP07/br0QZRMLwHtpGnnu0eFvRXWZ13KnzpUb/besatparts backup -C /home/besatparts/ domains -C /home/besatparts imap | /usr/bin/zstdmt --rsyncable > /home/tmp/admin.10068.x6hIFNoJ2jAxa014l4jvdWg3GEGtCP07/br0QZRMLwHtpGnnu0eFvRXWZ13KnzpUb/besatparts/user.admin.besatparts.tar.zst
User::setQuota(1000, inodes=0, partition='(null)') user=besatparts
quota command: /usr/sbin/xfs_quota -x -c 'limit -u bsoft=1024000k bhard=1126400k isoft=0 ihard=0 besatparts' /home
 
This output does not give a clue on what might break anything at all. I'm out of ideas. Probably somebody else has anything to add. I'd rather check it on the server's side by myself.

If you still face the same issue, you might open a ticket with DirectAdmin support and ask them for an investigation. If your license does not include the official support, you might hire a 3rd party for this.
 
It seems it has fixed using

cd /usr/local/directadmin/scripts
./set_permissions.sh all
 
Hello,
We have the same problem on lot of our directadmin servers.
All cron for backup not working since the 25 novembre 2022 (from the last directadmin update version)

crond (service) running good.

So, i run both commands :

echo "action=backup&id=4&owner=admin" >> /usr/local/directadmin/data/task.queue.da;
/usr/local/directadmin/dataskq d800

and the dataskq 800 , start working and execute backup etc.
I hope that the taly start to work normaly after that.
 
If you have the issue on a lot of your servers, you might contact DirectAdmin support directly via tickets. I've never seen the issue on my own and therefore have no solution. I really wonder to know what is the problem.

What I'd try is creating a test task to backup a small account every 5-10 minutes and going into debugging the issue until I find a solution.
 
Back
Top