If your don't want to increase the load of your system at peak hours and wish to only allow backups to be created by Resellers/Users within a certain range of time, you can use the all_pre.sh script to do so.
In this example we will code the all_pre.sh for the CMD_USER_BACKUP and the CMD_SITE_BACKUP to only be able to create backups between the hours of 1am and 8am.
Create /usr/local/directadmin/scripts/custom/all_pre.sh, and fill it with this code:
#!/bin/sh
MAKINGBACKUP=0
if [ "$command" = "/CMD_USER_BACKUP" ]; then
if [ "$action" = "create" ]; then
MAKINGBACKUP=1
fi
fi
if [ "$command" = "/CMD_SITE_BACKUP" ]; then
if [ "$action" = "backup" ]; then
MAKINGBACKUP=1
fi
fi
if [ "$MAKINGBACKUP" -eq 1 ]; then
HOUR=`date +%k`
if [ "$HOUR" -ge 1 ] && [ "$HOUR" -lt 8 ]; then
//this is a valid time, exit.
exit 0;
else
echo "Backups must be created between 1am and 8am";
exit 1;
fi
fi
exit 0;
chmod the all_pre.sh to 755.