MyBB Community Forums

Full Version: automatic mysql backups
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
what are you guys using for automatic daily mysql backups?
I use a cronjob at 2AM daily to back up to SAN storage. I really need to sort out offsite backups, just haven't got round to it yet.
(2015-08-04, 06:36 AM)Euan T Wrote: [ -> ]I use a corn job at 2AM daily to back up to SAN storage.

Too early for corn Toungue

I don't back up. Well, I don't... Toungue

Soon
I use the process here, which is already built in.

Works for me. The only time I do a full, manual backup of the website is if content has been uploaded.
(2015-08-04, 06:47 AM)Ben Cousins Wrote: [ -> ]
(2015-08-04, 06:36 AM)Euan T Wrote: [ -> ]I use a corn job at 2AM daily to back up to SAN storage.

Too early for corn Toungue

I don't back up. Well, I don't... Toungue

Soon

Blush Autocorrect strikes again!
(2015-08-04, 06:36 AM)Euan T Wrote: [ -> ]I use a cronjob at 2AM daily to back up to SAN storage. I really need to sort out offsite backups, just haven't got round to it yet.

does the cronjob trigger mysqldump or something?
Yeah, it just runs a shell script that calls mysqldump, then compresses the dump file using tar:

#!/bin/sh
mysqldump -u$1 -p$2 --opt $3 > /tmp/dbbackup/$3.sql
tar -zcvf /home/euan/$3.sql.tgz /tmp/dbbackup/$3.sql

This is then called as follows:

mysqlbackup.sh DBUSERNAME DBPASS DBNAME

The actual output path is slightly different, but that should give an idea Smile
(2015-08-04, 06:24 AM)andrewjs18 Wrote: [ -> ]what are you guys using for automatic daily mysql backups?

I have a separate server in an off-site location that maintains a replicated copy of the MySQL database using replication. Once per week I have a script that stops the database and gzip's up the data directory, then starts the database. Because this happens on a replicated machine, there is no downtime and the extra load/diskio doesn't affect the server. You might ask "why don't use mysqldump" and that's because it would easily take a month or more to do a mysqldump of my database Smile