Jump to content

Re-import / DB Reset


Recommended Posts

Two q's...

 

1. Is there a way to reset my WHMCS db? I want to remove ALL clients, and ALL invoices in one go.

2. What happens if I run the clientExec import script, then and some more users/orders in clientExec, then run the import script again?

 

As you might have gathered, I got more signups in CE, and now need to re-import the whole thing. Or at least, that's what i want to do.

 

Any help would be greatly appreciated! Thanks in advance!

Link to comment
Share on other sites

There is a WHMCS KB article that gives info on how to reset the database, however I've found that this drops things such as product addons and also leaves certain customer data in place. The following SQL query on your database will drop all client data, leaving all your configuration and products in place:

 

TRUNCATE `tblaccounts` ;

TRUNCATE `tblactivitylog` ;

TRUNCATE `tbladminlog` ;

TRUNCATE `tblaffiliates` ;

TRUNCATE `tblaffiliatesaccounts` ;

TRUNCATE `tblaffiliateshistory` ;

TRUNCATE `tblaffiliatespending` ;

TRUNCATE `tblbrowserlinks` ;

TRUNCATE `tblcancelrequests` ;

TRUNCATE `tblclients` ;

TRUNCATE `tblcontacts` ;

TRUNCATE `tblcredit` ;

TRUNCATE `tblcustomfieldsvalues` ;

TRUNCATE `tbldomains` ;

TRUNCATE `tbldomainsadditionalfields` ;

TRUNCATE `tblemails` ;

TRUNCATE `tblgatewaylog` ;

TRUNCATE `tblhosting` ;

TRUNCATE `tblhostingaddons` ;

TRUNCATE `tblhostingconfigoptions` ;

TRUNCATE `tblinvoiceitems` ;

TRUNCATE `tblinvoices` ;

TRUNCATE `tblnotes` ;

TRUNCATE `tblorders` ;

TRUNCATE `tblticketlog` ;

TRUNCATE `tblticketnotes` ;

TRUNCATE `tblticketreplies` ;

TRUNCATE `tbltickets` ;

TRUNCATE `tblupgrades` ;

TRUNCATE `tblwhoislog` ;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated