New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
@joodle 15 minutes sounds a little excessive, especially if it is a big database.
Something like this
http://www.cyberciti.biz/tips/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html
i have several cod4 servers, with kill/death stats (B3 + XLRStats) and those stats are being saved into a database everytime someone kills someone or gets killed, and i now want to backup that every 15 minutes, it's not big though, only like 100mb (compressed with tar ~5mb)
http://sourceforge.net/projects/automysqlbackup/
I'm using MysqlDumper (http://www.mysqldumper.net/features/)
Works great with easy GUI.
Works great with easy GUI.
Can I install this in a single location and have it dump multiple mysql servers on different systems to a specified location?
I'm sure you can do that.
Has anyone tried forwarding the mysql connection over ssh? Otherwise the database content would traverse the wire unencrypted.
@rds100, MySQL can be set up to do SSL fairly easily.
Mysql has encryption capabilities now http://dev.mysql.com/doc/refman/5.5/en/ssl-connections.html . Add a user, and force the user to connect with encryption: http://dev.mysql.com/doc/refman/5.5/en/grant.html#grant-other-characteristics
Very unlikely that someone would actually be interested in your DB stuff enough to actually care sniffing a corporate network.
That said, this is easy to do - either use Automysqlbackup, or write your own. Shouldn't take more than 15 minutes for either
(where's the thanks button). @Damian, @jeff_lfcvps - thanks.
@rsd100,
Yes, you can do that. Even can on app layer have remote database accessible as a datasource over SSH tunnel. Takes some fussing with command line for ssh to get it perfected. Syntax fun.
I do this lots semi-often. Haven't worked all the kinks out of my implementation though.
autossh should be used to keep the tunnel open and restart it when/if closed.
As for the OP:
cronjob needed for this.
use mysqldump to perform the exports of the data to local disk.
then use rsync to copy the local export to the remote server.
http://www.kvm.la/MySql-hot-backup.html
Remote backup use hotcopy or mysqldump,if you like can use mysql Master-slave.
mount ftp to local or rsync and lftp put backup file.
Yes, I would also say, if you're planning backups each 15 minutes or shorter, you might take a look at MySQL Slave replication for this...
Agreed, although the idea would be to set up slave replication and then run the backup from the slave. It will then not impact on your masters performance.
+1 on this, we do this at my day job.
Hello,Kevin,your script can only work on same MySQL version.