Thanks for all your help. I now have a nice backup script running. What I'm
planning to do a little later this summer is to set up a RAID backup server
on my DSL connection ftp downloading the mysql databases every night from my
co-location server. This way I will have a nice archive of dumps on
I finally got the script working. Seems to run smooth on my FreeBSD 4.11system:
MYSQLDUMP=`which mysqldump 2/dev/null` ||
MYSQLDUMP=/usr/local/bin/mysqldump
MYSQLDUMP_ARGS=--opt --extended-insert -h localhost -umyuser -pmypassword
mydb
ARCHDIR=/backup/mysql
NAME=db_dump
# Remove archives older
Good morning Andreas -
The --opt flag implies --extended-insert, in addition to some other
options, to generate an optimized (fast) dump file. See man
mysqldump. You don't need both but having both shouldn't hurt.
To restore, pipe your dump file back into the mysql client, a la
mysql -u user
: Recommended backup scripts for mysql databases
Andreas, if you are only using MyISAM tables, the included mysqlhotcopy
script may work for you. We used it at my previous employer with good
results. We would run it to create a snapshot of our data files every
day, then run a network backup
Tim Lucia wrote:
I am in the process of designing the backup procedures for a soon-to-be
production DB. I have gone back and forth on mysqldump and mysqlhotcopy.
As I see it (for MyISAM tables), the hot copy backs up faster, restores
faster, but does not allow for selective restores (Hello,
backup scripts for mysql databases
Andreas, if you are only using MyISAM tables, the included mysqlhotcopy
script may work for you. We used it at my previous employer with good
results. We would run it to create a snapshot of our data files every
day, then run a network backup utility that backed
Thanks for the examples. I haven't been able to get them to work yet.
Here's what I tried:
MYSQL=`which mysql 2/dev/null` || MYSQL=/usr/local/bin/mysql
MYSQL_ARGS=--opt -uroot -pmypassword db
ARCHDIR=/backup/mysql
NAME=db_dump
# Remove archives older than 64 days
find ${ARCHDIR} -type f -mtime
Looks like your full command would end up being:
mysqldump /usr/local/bin/mysql --opt -uroot -pmypassword db
which makes little sense. (You don't need that ${MYSQL} in there).
Instead, maybe what you want is to use an environment variable for
mysqldump, a la
MYSQLDUMP=`which mysqldump
On 6/29/06, Tim Lucia [EMAIL PROTECTED] wrote:
I am in the process of designing the backup procedures for a soon-to-be
production DB. I have gone back and forth on mysqldump and mysqlhotcopy.
As I see it (for MyISAM tables), the hot copy backs up faster, restores
faster, but does not allow for
-Original Message-
From: Dan Buettner [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 29, 2006 9:26 AM
To: Tim Lucia
Cc: mysql@lists.mysql.com
Subject: Re: Recommended backup scripts for mysql databases
Hi Tim - those are all important considerations, yes.
In my mind neither
-
From: Dan Buettner [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 29, 2006 9:26 AM
To: Tim Lucia
Cc: mysql@lists.mysql.com
Subject: Re: Recommended backup scripts for mysql databases
Hi Tim - those are all important considerations, yes.
In my mind neither mysqldump nor mysqlhotcopy
-Original Message-
From: Dan Buettner [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 29, 2006 6:01 PM
To: Tim Lucia
Cc: mysql@lists.mysql.com
Subject: Re: Recommended backup scripts for mysql databases
That's a good thought, Tim - file grep could provide a quick means to
access the data
Those warnings always give me pause, too - but I used mysqlhotcopy in
production for about 5 years at my previous place of employment.
Probably like the warnings about threading in perl 5.8 - been using
threads in production for nearly 2 years without a problem.
Only 2 problems with mysqlhotcopy
On 6/27/06, Andreas Widerøe Andersen [EMAIL PROTECTED] wrote:
Hi,
I have a few FreeBSD servers running various web/database things and I'm
looking for a good a reliable backup script that I can run through a
cronjob. I'm currently running the latest version of mysql323, but will
upgrade to
On Tue, Jun 27, 2006 at 08:19:41AM -0300, Daniel da Veiga wrote:
On 6/27/06, Andreas Widerøe Andersen [EMAIL PROTECTED] wrote:
Hi,
I have a few FreeBSD servers running various web/database things and I'm
looking for a good a reliable backup script that I can run through a
cronjob. I'm
Andreas, if you are only using MyISAM tables, the included mysqlhotcopy
script may work for you. We used it at my previous employer with good
results. We would run it to create a snapshot of our data files every
day, then run a network backup utility that backed up the snapshot (but
did not
16 matches
Mail list logo