markku
Well-known member
I use the following command to back up the XF database:
Whenever it is run, the forum is inaccessible (loading) for like 20-30 seconds.
Why does it lock the site? Can that be avoided?
Or is it a good thing it locks the site?
Is there a way to backup the database regularly while maintaining consistent data but not having the site being inaccessible for a little while?
Maybe setting up MySQL slave, replicating master to it and then backing up the slave?
Thanks for any thoughts.
Code:
mysqldump -hlocalhost -uxf -ppasswordcensored xfdb | gzip -9 > /home/backup/databases/xfdb.`/bin/date +\%Y\%m\%d`.sql.gz; chown backup:backup /home/backup/databases/*
Whenever it is run, the forum is inaccessible (loading) for like 20-30 seconds.
Why does it lock the site? Can that be avoided?
Or is it a good thing it locks the site?
Is there a way to backup the database regularly while maintaining consistent data but not having the site being inaccessible for a little while?
Maybe setting up MySQL slave, replicating master to it and then backing up the slave?
Thanks for any thoughts.