|
|
(8 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | __TOC__
| + | #REDIRECT [[Restoring_WHMCS]] |
− | ==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:
| |
− | | |
− | <div class="source-cli">
| |
− | TRUNCATE `mod_invoicedata` ;
| |
− | <br/>TRUNCATE `tblaccounts` ;
| |
− | <br/>TRUNCATE `tblactivitylog` ;
| |
− | <br/>TRUNCATE `tblaffiliates` ;
| |
− | <br/>TRUNCATE `tblaffiliatesaccounts` ;
| |
− | <br/>TRUNCATE `tblaffiliateshistory` ;
| |
− | <br/>TRUNCATE `tblaffiliatespending` ;
| |
− | <br/>TRUNCATE `tblaffiliateswithdrawals` ;
| |
− | <br/>TRUNCATE `tblbankaccounts`;
| |
− | <br/>TRUNCATE `tblbillableitems` ;
| |
− | <br/>TRUNCATE `tblcancelrequests` ;
| |
− | <br/>TRUNCATE `tblclients` ;
| |
− | <br/>TRUNCATE `tblclientsfiles` ;
| |
− | <br/>TRUNCATE `tblcontacts` ;
| |
− | <br/>TRUNCATE `tblcredit` ;
| |
− | <br/>TRUNCATE `tblcreditcards`;
| |
− | <br/>TRUNCATE `tblcustomfieldsvalues` ;
| |
− | <br/>TRUNCATE `tbldomains` ;
| |
− | <br/>TRUNCATE `tbldomainsadditionalfields` ;
| |
− | <br/>TRUNCATE `tblemails` ;
| |
− | <br/>TRUNCATE `tblhosting` ;
| |
− | <br/>TRUNCATE `tblhostingaddons` ;
| |
− | <br/>TRUNCATE `tblhostingconfigoptions` ;
| |
− | <br/>TRUNCATE `tblinvoiceitems` ;
| |
− | <br/>TRUNCATE `tblinvoices` ;
| |
− | <br/>TRUNCATE `tblnotes` ;
| |
− | <br/>TRUNCATE `tblorders` ;
| |
− | <br/>TRUNCATE `tblpaymethods`;
| |
− | <br/>TRUNCATE `tblquotes` ;
| |
− | <br/>TRUNCATE `tblquoteitems` ;
| |
− | <br/>TRUNCATE `tblsslorders` ;
| |
− | <br/>TRUNCATE `tblticketlog` ;
| |
− | <br/>TRUNCATE `tblticketnotes` ;
| |
− | <br/>TRUNCATE `tblticketreplies` ;
| |
− | <br/>TRUNCATE `tbltickets` ;
| |
− | <br/>TRUNCATE `tblupgrades` ;
| |
− | </div>
| |
− | | |
− | <div class="docs-alert-warning">
| |
− | <span class="title">Note</span><br />
| |
− | Resetting your database only deletes client accounts and information. You will not lose any configuration or product settings.
| |
− | </div>
| |
− | | |
− | ==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 > [[System 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:
| |
− | | |
− | #Log in to phpMyAdmin and select the database you want to restore.
| |
− | #Click the '''Import''' tab at the top: <br /><br />[[Image:maintenance1.png]] <br /><br />
| |
− | #Click the '''Browse''' button.
| |
− | #Find your backup file and then press '''OK'''.
| |
− | #Click '''Go'''. <br /><br />[[Image:maintenance2.png]]
| |