Difference between revisions of "Maintenance"
(→Backing up your WHMCS Database) |
|||
Line 14: | Line 14: | ||
<br/>TRUNCATE `tblaffiliatespending` ; | <br/>TRUNCATE `tblaffiliatespending` ; | ||
<br/>TRUNCATE `tblaffiliateswithdrawals` ; | <br/>TRUNCATE `tblaffiliateswithdrawals` ; | ||
− | <br/>TRUNCATE ` | + | <br/>TRUNCATE `tblbankaccts`; |
<br/>TRUNCATE `tblbillableitems` ; | <br/>TRUNCATE `tblbillableitems` ; | ||
<br/>TRUNCATE `tblcancelrequests` ; | <br/>TRUNCATE `tblcancelrequests` ; |
Revision as of 16:23, 7 September 2020
Resetting your database
After you successfully install your billing system, run through a series of tests, including creating client accounts and placing test orders with your particular setup. Often, after you have finished your testing, you will no longer want any of these clients or orders in your system. All you need to do is reset your system, which will remove all of your test accounts.
You can empty all the tables that contain clients' data by running the following SQL code on your database:
TRUNCATE `mod_invoicedata` ;
TRUNCATE `tblaccounts` ;
TRUNCATE `tblactivitylog` ;
TRUNCATE `tblaffiliates` ;
TRUNCATE `tblaffiliatesaccounts` ;
TRUNCATE `tblaffiliateshistory` ;
TRUNCATE `tblaffiliatespending` ;
TRUNCATE `tblaffiliateswithdrawals` ;
TRUNCATE `tblbankaccts`;
TRUNCATE `tblbillableitems` ;
TRUNCATE `tblcancelrequests` ;
TRUNCATE `tblclients` ;
TRUNCATE `tblclientsfiles` ;
TRUNCATE `tblcontacts` ;
TRUNCATE `tblcredit` ;
TRUNCATE `tblcreditcards`;
TRUNCATE `tblcustomfieldsvalues` ;
TRUNCATE `tbldomains` ;
TRUNCATE `tbldomainsadditionalfields` ;
TRUNCATE `tblemails` ;
TRUNCATE `tblhosting` ;
TRUNCATE `tblhostingaddons` ;
TRUNCATE `tblhostingconfigoptions` ;
TRUNCATE `tblinvoiceitems` ;
TRUNCATE `tblinvoices` ;
TRUNCATE `tblnotes` ;
TRUNCATE `tblorders` ;
TRUNCATE `tblpaymethods`;
TRUNCATE `tblquotes` ;
TRUNCATE `tblquoteitems` ;
TRUNCATE `tblsslorders` ;
TRUNCATE `tblticketlog` ;
TRUNCATE `tblticketnotes` ;
TRUNCATE `tblticketreplies` ;
TRUNCATE `tbltickets` ;
TRUNCATE `tblupgrades` ;
Note
Resetting your database only deletes client accounts and information. You will not lose any configuration or product settings.
Backing up your WHMCS Database
We strongly recommend that you back up your WHMCS database regularly to ensure you always have a copy of your data in case of system failure. Backing up the database is simple using the built-in backup tool:
- Log in to your WHMCS Admin Area.
- Go to Utilities > Database Status.
- Click the Download Full Database Backup button at the top of the page. The system will prompt you to download a file.
- Save the file to your computer. Depending on the database size, this may take a few moments.
Restoring a Database Backup
If you need to restore a backup of your database, you will first need to recreate your database, if you haven't already, and drop the existing WHMCS tables.
To restore a database: