The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
I'd ask Chen this but it's waaaaaaaaay beyond HIM...
I have a demo board that I use to show off vB Lite. Every 12 hours or so, how can I have the board automatically reset itself? I mean:
1. Empty the entire db 2. Import the original, fresh install db from a .sql file ? |
#2
|
||||
|
||||
I doubt it's beyond Chen.
Have a cron job fire off a shell script. Something like this... Code:
#!/bin/sh /path/to/mysql -uUser -pPassword -e "DELETE FROM table_name" /path/to/mysql -uUser -pPassword -e "DELETE FROM table_name2" /path/to/mysqlimport -uUser -pPassword database_name file_name.sql |
#3
|
||||
|
||||
Or if you have root access, DROP DATABASE, CREATE DATABASE and load the file.
(umm, there IS a problem with [code]... argh) |
#4
|
||||
|
||||
Ya, looks like its calling nl2br twice.
|
#5
|
|||
|
|||
Coolness...since this is running on my own system I can just schedule a batch file to be run every 12 hours or something?
|
#6
|
|||
|
|||
Quote:
|
#7
|
|||
|
|||
This little batch file doesn't work:
Code:
@echo off echo Resetting vB Lite Demo Board on localhost... c: cd \mysql\bin mysql -uroot -e "DELETE FROM vblite" mysqlimport -uroot vblite \vblite.sql echo Reset complete Code:
C:\>resvblite Resetting vB Lite Demo Board on localhost... ERROR 1046 at line 1: No Database Selected mysqlimport: Error: Table 'vblite.vblite' doesn't exist, when using table: vblite Reset complete |
#8
|
||||
|
||||
I think I gave you the wrong syntax... sorry
mysql -uUser -pPassword -e "DELETE FROM table_name" database_name |
#9
|
||||
|
||||
Or just put EVERYTHING in the vblite.sql file...
Start it with: [sql]USE database_name;[/sql] Then proceed with the DELETE FROM queries, and then the import queries. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|