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

mysqldump needed to backup XenForo?

Discussion in 'XenForo Questions and Support' started by Puntocom, Jul 20, 2015.

  1. Puntocom

    Puntocom Well-Known Member

    Hello, I'm making daily backups using dump (filesystem backups) and weekly ones using mysqldump.

    Is it needed to use mysqldump due to innodb tables, or in case of problems I can just rebuild the search index and I am fine?
     
  2. GeorgeS

    GeorgeS Member

    Hello, Puntocom -


    I run the mysqldump daily. The filesystem backup (at least of the directory tree where XenForo is installed) together with the mysqldump (this holds the user, post, thread, etc. information of your XenForo board) is needed to rebuild the board in case of a crash.

    Search indexes are created from the current, existing content of the MySQL server database (i.e. it is redundant information).
     
  3. Puntocom

    Puntocom Well-Known Member

    I was doing mysqldump daily but I have the problem for the forum not responding during the time it takes to make the backup.
    I use
    Code:
    mysqldump -uxxx -pyyy --events db > db.sql
    
    I have changed it to
    Code:
    mysqldump -uxxx -pyyy --single-transaction --events db > db.sql
    
    Any idea? I want to backup at least daily but I don't want to cause any downtime.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I use this:
    Code:
    mysqldump -u -p --single-transaction --skip-lock-tables database_name > /path/to/backup/database_name_$(date +%d.%m.%y).sql
     
    Liam W, Pieman, HWS and 3 others like this.
  5. Gladius

    Gladius Well-Known Member

  6. AndyB

    AndyB Well-Known Member

    This is normal and there's nothing you can do about it as far as I know.

    I use this add-on to turn off the forum during a backup.

    Board Active Cron
     
  7. Puntocom

    Puntocom Well-Known Member

    I forgot to comment, with Brogan's advice I solved my problem.

    Thank you all.
     
  8. teletubbi

    teletubbi Active Member

    There is something.
    Use percona and xtrabackup from them. There are no locks. Make hot backups.
    My DB is ~ 5GB and i run a daily full backup and every 3 hours an incremental.
    You don't even recognize that's a backup is running.
     

Share This Page