You are not logged in.
Hello, I'm trying to configure rsnapshot to backup my server over ssh.
I need to backup some directories and mysql dabase.
So far I've got everything working but the mysql part.
Its a bit unclear where the problem might be from the logs even with loglevel at 5.
Right now it just makes empty dumps
the bit from rsnapshot.conf
# EXAMPLE.COM
backup_script /bin/date "+ backup of arch started at %c" unused1
backup vlad@arch:/home/vlad/public_html/site1/ arch/ +rsync_long_args=--bwlimit=16,exclude=core
backup vlad@arch:/etc/ arch/ exclude=mtab,exclude=core
backup_script /home/vladman/backup_mysql.sh vlad@arch "mysqldump -A > /var/db/dump/mysql.sql" unused2
backup vlad@arch:/var/db/dump/ vlad/
backup_script /bin/date "+ backup of vlad ended at %c" unused9
the backup_mysql.sh
#!/bin/bash
##############################################################################
# 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.6 2007/03/22 02:50:21 drhyde Exp $
umask 0077
# 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
.my.cnf on local machene
# /root/.my.cnf (chmod 0600)
[client]
user = root
password = mypassword
host = localhost
This is what I have so far...
Also I think it should be adding dates to folder names? it does not...
Everything checks out in the sest mode...
If someone can help I would really appreciate it!
If you need to see the logs let me know.
Last edited by Vladman (2009-07-11 16:25:48)
Offline
Take it easy, and read this tutorial
Offline
OK thanks, I will do some more reading.
Offline