open and clos XF with SQL query

hcmagix

Active member
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?
 
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
 
@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
 
@Brogan thx but I backup many databases on my root server with this script

@MattW I know that addon but I dont need, I need a SQL query for closing forum :)
 
Top Bottom