reset user usage through API

Ehsan

Verified User
Joined
Jul 13, 2011
Messages
30
Hello,

I moved a backup to new server and restored it, The user usage in "CMD_SHOW_USER" shows the usage from the old server, I want to reset this usage (like bandwidth, sent email, ...), what is the regular method for this propose?
Is there any way to reset usage through API?

Any help would be much appreciated.
 
Hello,

You can reset the monthly usage for everyone, or any User, but it must be done through ssh.

To reset everyone to 0, right now, use this (same as DA uses each month):
Code:
echo 'action=reset&value=all' >> /usr/local/directadmin/data/task.queue
To reset 1 User to 0, right now, use this:
Code:
echo 'action=reset&value=[b]usertoreset[/b]&type=user' >> /usr/local/directadmin/data/task.queue

Or, if your reset didn't work for the previous month, but you still want to keep this months usage, there is a clean reset as well (can be for all or one user):
http://www.directadmin.com/features.php?id=618


One newer related feature, if a User needs more bandwidth for this month, instead of resetting his account to 0, you can instead allocate him a temporary bandwidth increase (only increases bandwidth, not email send limit):
http://www.directadmin.com/features.php?id=1127

John
 
Back
Top