1. 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

Discussion in 'General PHP and MySQL Discussions' started by hcmagix, Dec 16, 2013.

  1. hcmagix

    hcmagix 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?
  2. Brogan

    Brogan 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
  3. MattW

    MattW 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
  4. hcmagix

    hcmagix Active Member

    @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 :)
  5. MattW

    MattW Well-Known Member

    Download the add-on, and look at what query it's running :)

Share This Page