Jump to content

MySQL Backup Script + FTP


Recommended Posts

  • 1 year later...
  • 8 months later...
  • Premium

I don't see why it shouldn't work.

 

By the way if you run a live server and have problems with the server lagging at backup time, here's a solution

$MYSQLDUMP -u $MYSQL_USER -p$MYSQL_PASS $db | $GZIP -9 | cstream -t 16m > $LOCAL_FOLDER/$FILE

 

Installing cstream (pkg install cstream) will allow you to set a bandwidth for the dump, in this case I set it at 16 mb per second. Tune to your liking.

 

There are other issues related to backing up a live server though, mainly the consistency - while we are backing up something, something else may get updated creating an inconsistency or worse,corrupting the table. Also MyISAM tables get locked during a backup, potentially crashing or lagging the game in the meantime. Consider switching to InnoDB.

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.