Difference between revisions of "Maintenance"
(→Resetting your database) |
(→Resetting your database) |
||
Line 8: | Line 8: | ||
TRUNCATE `tblaffiliates` ; | TRUNCATE `tblaffiliates` ; | ||
TRUNCATE `tblaffiliatesaccounts` ; | TRUNCATE `tblaffiliatesaccounts` ; | ||
+ | TRUNCATE `tblaffiliateshistory` ; | ||
+ | TRUNCATE `tblaffiliatespending` ; | ||
+ | TRUNCATE `tblaffiliateswithdrawals` ; | ||
TRUNCATE `tblbillableitems` ; | TRUNCATE `tblbillableitems` ; | ||
TRUNCATE `tblcancelrequests` ; | TRUNCATE `tblcancelrequests` ; | ||
TRUNCATE `tblclients` ; | TRUNCATE `tblclients` ; | ||
+ | TRUNCATE `tblclientsfiles` ; | ||
TRUNCATE `tblcontacts` ; | TRUNCATE `tblcontacts` ; | ||
− | TRUNCATE ` | + | TRUNCATE `tblcredit` ; |
TRUNCATE `tblcustomfieldsvalues` ; | TRUNCATE `tblcustomfieldsvalues` ; | ||
TRUNCATE `tbldomains` ; | TRUNCATE `tbldomains` ; | ||
+ | TRUNCATE `tbldomainsadditionalfields` ; | ||
TRUNCATE `tblemails` ; | TRUNCATE `tblemails` ; | ||
TRUNCATE `tblhosting` ; | TRUNCATE `tblhosting` ; | ||
Line 21: | Line 26: | ||
TRUNCATE `tblinvoiceitems` ; | TRUNCATE `tblinvoiceitems` ; | ||
TRUNCATE `tblinvoices` ; | TRUNCATE `tblinvoices` ; | ||
+ | TRUNCATE `tblnotes` ; | ||
TRUNCATE `tblorders` ; | TRUNCATE `tblorders` ; | ||
+ | TRUNCATE `tblquotes` ; | ||
+ | TRUNCATE `tblquoteitems` ; | ||
+ | TRUNCATE `tblsslorders` ; | ||
TRUNCATE `tblticketlog` ; | TRUNCATE `tblticketlog` ; | ||
TRUNCATE `tblticketnotes` ; | TRUNCATE `tblticketnotes` ; | ||
TRUNCATE `tblticketreplies` ; | TRUNCATE `tblticketreplies` ; | ||
− | TRUNCATE `tbltickets` ; | + | TRUNCATE `tbltickets` ; |
+ | TRUNCATE `tblupgrades` ; | ||
− | Note: Resetting your database only deletes client accounts and information. You will not lose any configuration settings you have setup. | + | Note: Resetting your database only deletes client accounts and information. You will not lose any configuration or product settings you have setup. |
==Backing up your WHMCS Database== | ==Backing up your WHMCS Database== |
Revision as of 11:08, 23 July 2011
Resetting your database
After you successfully install your billing system you should run through a series of tests. This includes creating client accounts and placing test orders with your particular setup. Often, once 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 and all your test accounts will be removed.
You can empty all the tables that contain clients data by running the following SQL code on your database:
TRUNCATE `tblaccounts` ; TRUNCATE `tblactivitylog` ; TRUNCATE `tblaffiliates` ; TRUNCATE `tblaffiliatesaccounts` ; TRUNCATE `tblaffiliateshistory` ; TRUNCATE `tblaffiliatespending` ; TRUNCATE `tblaffiliateswithdrawals` ; TRUNCATE `tblbillableitems` ; TRUNCATE `tblcancelrequests` ; TRUNCATE `tblclients` ; TRUNCATE `tblclientsfiles` ; TRUNCATE `tblcontacts` ; TRUNCATE `tblcredit` ; TRUNCATE `tblcustomfieldsvalues` ; TRUNCATE `tbldomains` ; TRUNCATE `tbldomainsadditionalfields` ; TRUNCATE `tblemails` ; TRUNCATE `tblhosting` ; TRUNCATE `tblhostingaddons` ; TRUNCATE `tblhostingconfigoptions` ; TRUNCATE `tblinvoiceitems` ; TRUNCATE `tblinvoices` ; TRUNCATE `tblnotes` ; TRUNCATE `tblorders` ; 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 you have setup.
Backing up your WHMCS Database
It is strongly recommended that you backup your WHMCS Database regularly to ensure you always have a copy of your data should a server or system failure occur. Backing up the database is a very simply task with the built in backup tool. This is how to use it:
- Login to your WHMCS Admin Area
- Go to Utilities > Database Status
- Click the Download Full Database Backup button at the top of the page
- You should be prompted for a file to download. Save the file to your computer. Depending on the database size, this may take a few moments.
- Once the download is complete you have now backed up your database.
Restoring a Database Backup
If you need to restore a backup of your database then you will need to use the following steps. If you have not already recreated your database, do so now. If your database is created, you must drop the existing WHMCS tables.