disable user backup

seachen

Verified User
Joined
Feb 3, 2007
Messages
491
may i know how to disable user backup?

it will cause server load high.
 
You can also limit when users can backup, say between 1am to 2am.

edit
/usr/local/directadmin/scripts/custom/all_pre.sh
and put
Code:
#!/bin/sh
MAKINGBACKUP=0
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 [color="red"]1[/color] ] && [ "$HOUR" -lt [color="red"]2[/color] ]; then
        //this is a valid time, exit.
        exit 0;
    else
        echo "Backups must be created between 1am and 2am";
        exit 1;
    fi
fi
edit the red bits to specify the hours
 
Back
Top