It's easy shell.
-----
#!/usr/bin/bash
DATE=`/usr/bin/date '+%Y%m%d%H%M%S'`  # or '+%Y%m%d'
mysqldump -uUsername -pPassword --all-databases > tmp.sql && tar  \
 -cf MySQL-Backup-${DATE}.tar.gz -z tmp.sql && rm -f tmp.sql
-----
-RG

On Tue, 2 Apr 2002, David McInnis wrote:

> Date: Tue, 2 Apr 2002 10:53:27 -0800
> From: David McInnis <[EMAIL PROTECTED]>
> To: 'Jonathan Hilgeman' <[EMAIL PROTECTED]>, [EMAIL PROTECTED],
>      [EMAIL PROTECTED]
> Subject: RE: backup databases
>
> Could you share your script for doing the date thing with the rest of
> us?  That sounds useful.
>
> David McInnis
>
> -----Original Message-----
> From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 02, 2002 10:40 AM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: backup databases
>
> I regularly back up all my databases with mysqldump:
>
> mysqldump -uUsername -pPassword --all-databases > tmp.sql && tar -cf
> MySQL-Backup-DATE.tar.gz -z tmp.sql && rm -f tmp.sql
>
> I use a script (to determine DATE) in conjunction with cron to back all
> databases up nightly, and I also have the script e-mail the .tar.gz file
> to
> me so I can have a backup in case the server goes down.
>
> I've heard of hotcopy but never used it, so I couldn't recommend or
> "unrecommend" it.
>
> - Jonahtan
>
>
> -----Original Message-----
> From: Kory Wheatley [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 02, 2002 10:27 AM
> To: [EMAIL PROTECTED]
> Subject: backup databases
>
>
> What is the best method to backup all your MYSQL DATBASES with not a lot
> of down time.  I have read  about using  "mysqlhotcopy" and "mysqldump"
> are these the best methods. Also what procedure is followed in backing
> up the databases. I'm basically looking for the must accurate and
> reliable way of doing this.
>
> --
> #########################################
> Kory Wheatley
> Academic Computing Analyst Sr.
> Phone 282-3874
> #########################################
> Everything must point to him.
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to