Re: [Nolug] Looking for an automated FTP backup script for mysqldump

From: Ron Johnson <ron.l.johnson_at_cox.net>
Date: 21 Jul 2003 00:12:14 -0500
Message-Id: <1058764333.7154.118.camel@haggis>

On Sun, 2003-07-20 at 13:44, Andrew S. Johnson wrote:
> On Sunday 20 July 2003 11:16 am, Ron Johnson wrote:
> > On Sun, 2003-07-20 at 10:35, David wrote:
> > > Greetings All:
> > >
> > >
> > >
> > > I am trying to find a script that will backup the contents of
> > > mysqldump to an FTP. I have found a couple of half descent scripts
> > > that sort of do what I want, but none that suit me to the ´T¡. Since
> > > there is no sense trying to reinvent the wheel, I figured someone
> > > could provide some insight or point me in the right direction. Any
> > > help would be greatly appreciated.
> >
> > Since ftp send passwords as cleartext, how about this:
> >
> > x=`date +%y%m%d.%H%M`
> > stime=`date +%Y-%m-%d:%H:%M`
> > y=`uname -n`
> > db=<name_of_mysql_database>
> > mysqldump | tar cvfj > /tmp/mysql_${y}_${db}_${x}.dmp.bz2
> > scp /tmp/mysql_${y}_${db}_${x}.dmp.bz2 desthost:/dir/it/goes/in
> >
> > There's a way to config ssh/scp so that passwords are not necessary,
> > while still maintaining cryptographic security. Don't know how
> > to configure it, though.
>
> This is what rsync is for, and it supports ssh.

But then you'd only have 1 copy of your sqldump on the remote machine.
Not good if you have to restore from a previous dump.

Also, rsync doesn't work well with compressed files.

-- 
+-----------------------------------------------------------------+
| Ron Johnson, Jr.        Home: ron.l.johnson@cox.net             |
| Jefferson, LA  USA                                              |
|                                                                 |
| "I'm not a vegetarian because I love animals, I'm a vegetarian  |
|  because I hate vegetables!"                                    |
|    unknown                                                      |
+-----------------------------------------------------------------+
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/21/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST