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.
-- +-----------------------------------------------------------------+ | 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.orgReceived on 07/20/03
This archive was generated by hypermail 2.2.0 : 12/19/08 EST