Difference between revisions of "Maintenance"
m (→Resetting your database) |
|||
Line 32: | Line 32: | ||
<br/>TRUNCATE `tblinvoiceitems` ; | <br/>TRUNCATE `tblinvoiceitems` ; | ||
<br/>TRUNCATE `tblinvoices` ; | <br/>TRUNCATE `tblinvoices` ; | ||
+ | <br/>TRUNCATE `tblmodulequeue` ; | ||
<br/>TRUNCATE `tblnotes` ; | <br/>TRUNCATE `tblnotes` ; | ||
<br/>TRUNCATE `tblorders` ; | <br/>TRUNCATE `tblorders` ; |
Revision as of 12:25, 27 October 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 `tblinvoicedata` ;
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 `tblmodulequeue` ;
TRUNCATE `tblnotes` ;
TRUNCATE `tblorders` ;
TRUNCATE `tblpaymethods`;
TRUNCATE `tblquotes` ;
TRUNCATE `tblquoteitems` ;
TRUNCATE `tblsslorders` ;
TRUNCATE `tblticketlog` ;
TRUNCATE `tblticketnotes` ;
TRUNCATE `tblticketreplies` ;
TRUNCATE `tbltickets` ;
TRUNCATE `tblupgrades` ;
TRUNCATE `tblusers`;
TRUNCATE `tblusers_clients`;
TRUNCATE `tbluser_invites`;
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: