Hello. When downloading a backup through the control panel, it’s stored indefinitely in the /backup folder.
Even though the system says it will be deleted after 12 hours, none of this works.
The same thing happens when downloading a database backup through the control panel (not phpMyAdmin).
Backups are made to a remote SFTP storage. The control panel also downloads them from there when requested.
How can this be fixed?
Hi,
Show the output of this command:
atq | while read -r line; do jobid=$(awk '{print $1}' <<<"$line"); echo;echo "### Checking job $line" | sed -E 's/\t/: /' ; echo; at -c "$jobid"; echo "--------------"; done
### Checking job 1383: Tue Mar 17 11:18:00 2026 a root
#!/bin/sh
# atrun uid=0 gid=0
# mail hestiaweb 0
umask 22
SUDO_GID=1000; export SUDO_GID
SUDO_COMMAND=/usr/local/hestia/bin/v-update-sys-queue\\ backup; export SUDO_COMMAND
SUDO_USER=hestiaweb; export SUDO_USER
PWD=/backup; export PWD
LOGNAME=root; export LOGNAME
HOME=/root; export HOME
LANG=ru_RU.UTF-8; export LANG
HESTIA=/usr/local/hestia; export HESTIA
USER=root; export USER
SHLVL=3; export SHLVL
LC_TIME=ru_RU.UTF-8; export LC_TIME
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin; export PATH
SUDO_UID=1000; export SUDO_UID
MAIL=/var/mail/root; export MAIL
OLDPWD=/var/spool/cron; export OLDPWD
cd /backup || {
echo ‘Execution directory inaccessible’ >&2
exit 1
}
rm /backup/xxxx.2026-03-16_11-16-49.tar
That at job is created to remove /backup/xxxx.2026-03-16_11-16-49.tar tomorrow at 11:18.
Yes, I see that. But I already deleted it manually because I’m sure it won’t be deleted automatically. The folders were full for a week. I don’t understand why.
Why then don’t copies of databases or files downloaded via /download/database/?database=хххххх&token=2c9cf74368d23255134e72b934dfa90c
get queued?
I don’t know, the at job is created and it will try to remove the downloaded backup as root so it shouldn’t be a perm issue.
I’ve tested it right now and the at job is created when downloading a DB.
### Checking job 21: Mon Mar 16 19:26:00 2026 a root
#!/bin/sh
# atrun uid=0 gid=0
# mail root 0
umask 22
SUDO_GID=1014; export SUDO_GID
LANGUAGE=en; export LANGUAGE
SUDO_COMMAND=/usr/local/hestia/bin/v-dump-database\ test\ test_28177\ file\ gzip; export SUDO_COMMAND
SUDO_USER=hestiaweb; export SUDO_USER
PWD=/usr/local/hestia/web/download/database; export PWD
LOGNAME=root; export LOGNAME
HOME=/root; export HOME
LANG=en_US.UTF-8; export LANG
HESTIA=/usr/local/hestia; export HESTIA
USER=root; export USER
SHLVL=1; export SHLVL
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin; export PATH
SUDO_UID=1014; export SUDO_UID
MAIL=/var/mail/root; export MAIL
cd /usr/local/hestia/web/download/database || {
echo 'Execution directory inaccessible' >&2
exit 1
}
rm /backup/test_test_28177_mysql_2026-03-16_18-26-51.sql.gz
Well, after downloading the files or database, the correct deletion option isn’t created. Where should I even look?
That’s weird because it has been created earlier.
The scripts used by Hestia are v-download-backup and v-dump-database. You could execute them using bash -x herethescript arguments to debug the script.
at now + 1 hour
warning: commands will be executed using /bin/sh
Cannot open lockfile /var/spool/cron/atjobs/.SEQ: No such file or directory
====
Problem resolved. This solution may be helpful to you:
touch /var/spool/cron/atjobs/.SEQ
chown daemon:daemon /var/spool/cron/atjobs/.SEQ
chmod 600 /var/spool/cron/atjobs/.SEQ
systemctl restart atd
===
Thanks for the tip @sahsanu
1 Like