• 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


Active member
For long time I describe for german VB users with root servers a how to for database backups with cronjobs

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?


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

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


Well-known member
@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