WHM now stores all of its users’ bandwidth information in sqlite files, rather than in flat text files. These directions will allow you to set a users’ bandwidth to 0.
Step 1: Enter the bandwidth data folder, and make a backup of the sqlite database: (replace ‘user’ with the cPanel user for your account)
cd /var/cpanel/bandwidth
cp user.sqlite /root/
Step 2: Enter the user’s sqlite database: (replace ‘user’ with the cPanel user for your account)
sqlite3 user.sqlite
Step 3: Delete the data, and then exit sqlite. (Make sure to update the date that you’re using):
sqlite> DELETE FROM bandwidth_5min WHERE unixtime >= strftime("%s","2015-10-05");
sqlite> DELETE FROM bandwidth_5min WHERE unixtime >= strftime("%s","2015-10-05");
sqlite> DELETE FROM bandwidth_daily WHERE unixtime >= strftime("%s","2015-10-05");
sqlite>.quit
Step 4: Restart cpanellogd:
/scripts/restartsrv_cpanellogd
Step 5: Run weblogs for the user. (replace ‘user’ with the cPanel user for your account)
/scripts/runweblogs user
Once that’s complete, if you go back to ‘View Bandwidth User’ you’ll see the user is now at 0.