• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

open and clos XF with SQL query

hcmagix

Active member
#1
For long time I describe for german VB users with root servers a how to for database backups with cronjobs
http://forum.vbulletin-germany.com/showthread.php/22889-DOKU-DB-automatisch-sichern

In my script I use
mysql -u${DBUSER} -p${DBPASS} -hlocalhost -e "UPDATE ${DBNAME}.${PRAEFIX}datastore SET data = REPLACE(data,'bbactive\";i:1:\"1\"','bbactive\";i:1:\"0\"') WHERE title = 'options'"

for closing and

mysql -u${DBUSER} -p${DBPASS} -hlocalhost -e "UPDATE ${DBNAME}.${PRAEFIX}datastore SET data = REPLACE(data,'bbactive\";i:1:\"0\"','bbactive\";i:1:\"1\"') WHERE title = 'options'"

for opening the Vbulletin at the begin and end ob the backup job. Can I close and open xenforo of the same way?

Have anybody the sql statements for me?
 

Brogan

XenForo moderator
Staff member
#2
I simply use this to backup the database.

Code:
mysqldump -u<user> -p<password> --single-transaction --skip-lock-tables db_name > /path/to/backup/db_name_$(date +%d.%m.%y).sql
 

MattW

Well-known member
#3
@Chris Deeming released an add-on to close / open the forum via the built in cron system. I just time my backup script to run during the period the board is set to closed by his add-on