Dr.CustUmz
10-05-2020, 07:16 AM
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:
00 * * * * mysql -u root -p123456 demo < /path/to/my/demo_backup.sql
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.
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:
00 * * * * mysql -u root -p123456 demo < /path/to/my/demo_backup.sql
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.