diff options
author | Sean Donner <sean.donner@sbcglobal.net> | 2010-05-11 20:01:09 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 20:01:09 +0200 |
commit | 988861d8dca420f5c8b1663721869b99f04eacf8 (patch) | |
tree | 70b134924d7d5f46fd169f4393430d5e9d9a4ae9 /misc/rsnapshot/contrib/rsnapshot_backup_mysql | |
parent | c25ac953ad4870cd2ac187ce1e5ff8e4083d3c33 (diff) | |
download | slackbuilds-988861d8dca420f5c8b1663721869b99f04eacf8.tar.gz slackbuilds-988861d8dca420f5c8b1663721869b99f04eacf8.tar.xz |
misc/rsnapshot: Added to 12.0 repository
Diffstat (limited to 'misc/rsnapshot/contrib/rsnapshot_backup_mysql')
-rw-r--r-- | misc/rsnapshot/contrib/rsnapshot_backup_mysql | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/misc/rsnapshot/contrib/rsnapshot_backup_mysql b/misc/rsnapshot/contrib/rsnapshot_backup_mysql new file mode 100644 index 0000000000..5d75265d2c --- /dev/null +++ b/misc/rsnapshot/contrib/rsnapshot_backup_mysql @@ -0,0 +1,32 @@ +#!/bin/sh + +############################################################################## +# backup_mysql.sh +# +# by Nathan Rosenquist <nathan@rsnapshot.org> +# http://www.rsnapshot.org/ +# +# This is a simple shell script to backup a MySQL database with rsnapshot. +# +# The assumption is that this will be invoked from rsnapshot. Also, since it +# will run unattended, the user that runs rsnapshot (probably root) should have +# a .my.cnf file in their home directory that contains the password for the +# MySQL root user. For example: +# +# /root/.my.cnf (chmod 0600) +# [client] +# user = root +# password = thepassword +# host = localhost +# +# This script simply needs to dump a file into the current working directory. +# rsnapshot handles everything else. +############################################################################## + +# $Id: backup_mysql.sh,v 1.5 2005/04/03 13:52:02 scubaninja Exp $ + +# backup the database +/usr/bin/mysqldump --all-databases > mysqldump_all_databases.sql + +# make the backup readable only by root +/bin/chmod 600 mysqldump_all_databases.sql |