vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=328262

Reset DB Automagically (Timed Base)
by Dr.CustUmz
05 Oct 2020 09:16

So this was an idea that just popped in my head, I find myself re-installing vB ALOT. I have made a default test environment and SQL backup that I re-import every time that has preset users, forums and posts. What I was wondering though, is there a way to do this via a cron? Lets say I want my test board to go back to default every night at midnight.

Is there a script that exist on here? (I tried searching but my terms are returning too many results and I have yet to find anything.)

Or maybe I can create a script that drops all tables then reinstalls my backup (idk brainstorming here)

*ideas*
cron based (if option on)
push button to reset (confirmation msg)

So I read up a little on this
What I'm getting is the easiest way to do this is a server side cron, which would literally be as easy as adding my SQL to a cron and setting a time:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

that wouldn't let me control anything via vB admin though.

So more brainstorming here:
Fresh install on a new DB (add ALL desired content I.E. Users, Forums, Settings, Threads, Posts, ect.)(DO NOT INSTALL ANY PRODUCTS!) - This is to be a clean DB to copy DB info from.

Create a product that drops all default vB tables
Create and inset every row (could steal from install script?)
Insert default data (users, forums, threads, posts)
Insert data for the product we created (This will need to be "installed" with the "Fresh install" EVERYTIME so lets include it in our base install.)

Options in the CP (would this even be possible if were droping all tables?)

and thinking all of this, now has me thinking .....just use the install script.


All times are GMT. The time now is 21:30.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.