Re: Recommended backup scripts for mysql databases

2006-07-01 Thread Andreas Widerøe Andersen
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

Re: Recommended backup scripts for mysql databases

2006-06-30 Thread Andreas Widerøe Andersen
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

Re: Recommended backup scripts for mysql databases

2006-06-30 Thread Dan Buettner
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

RE: Recommended backup scripts for mysql databases

2006-06-29 Thread Tim Lucia
: 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

Re: Recommended backup scripts for mysql databases

2006-06-29 Thread Gerald L. Clark
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,

Re: Recommended backup scripts for mysql databases

2006-06-29 Thread Dan Buettner
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

Re: Recommended backup scripts for mysql databases

2006-06-29 Thread Andreas Widerøe Andersen
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

Re: Recommended backup scripts for mysql databases

2006-06-29 Thread Dan Buettner
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

Re: Recommended backup scripts for mysql databases

2006-06-29 Thread Daniel da Veiga
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

RE: Recommended backup scripts for mysql databases

2006-06-29 Thread Tim Lucia
-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

Re: Recommended backup scripts for mysql databases

2006-06-29 Thread Dan Buettner
- 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

RE: Recommended backup scripts for mysql databases

2006-06-29 Thread Tim Lucia
-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

Re: Recommended backup scripts for mysql databases

2006-06-29 Thread Dan Buettner
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

Recommended backup scripts for mysql databases

2006-06-27 Thread Andreas Widerøe Andersen
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 version 4.1 soon aswell as upgrade most of the servers to the latest

Re: Recommended backup scripts for mysql databases

2006-06-27 Thread Daniel da Veiga
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

Re: Recommended backup scripts for mysql databases

2006-06-27 Thread Timur Izhbulatov
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

Re: Recommended backup scripts for mysql databases

2006-06-27 Thread Dan Buettner
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

RE: backup scripts

2005-03-04 Thread Kelly . Brace
-3895 Cell: 716-432-4978 [EMAIL PROTECTED] Tom Crimmins [EMAIL PROTECTED] 03/03/2005 03:06 PM To [EMAIL PROTECTED] cc mysql@lists.mysql.com Subject RE: backup scripts Kelly, You can find out what user mysqld is running as with the following: #ps axu | grep mysqld To change

backup scripts

2005-03-03 Thread Kelly . Brace
Hello, When I attempt to try and run the backup: shell mysqldump --tab=/path/to/some/dir --opt db_name I get the following errors: ./mysqldump: Got error: 1: Can't create/write to file '/usr/local/mysql/bakups/config.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE' Or: shell

RE: backup scripts

2005-03-03 Thread Tom Crimmins
On Thursday, March 03, 2005 13:12, [EMAIL PROTECTED] wrote: Hi Kelly, Hello, When I attempt to try and run the backup: shell mysqldump --tab=/path/to/some/dir --opt db_name I get the following errors: ./mysqldump: Got error: 1: Can't create/write to file

RE: backup scripts

2005-03-03 Thread Tom Crimmins
Kelly, You can find out what user mysqld is running as with the following: #ps axu | grep mysqld To change the permissions on the directory run the following as root: #chown mysql.mysql /usr/local/mysql/bakups #chmod 770 /usr/local/mysql/bakups If it is a different user, substitute it in for

Re: My backup scripts and how reliable are they?

2004-02-27 Thread Adam Hardy
On 02/26/2004 09:02 AM Scott Haneda wrote: As per the reco of someone on this list, I created a bash script that runs once a day to do the following: # set path to final destination location=/Volumes/foo/sql_dumps/ # set db_list to the list of databases db_list=`echo show databases |

Re: My backup scripts and how reliable are they?

2004-02-27 Thread Scott Haneda
on 02/27/2004 09:53 AM, Adam Hardy at [EMAIL PROTECTED] wrote: On 02/26/2004 09:02 AM Scott Haneda wrote: As per the reco of someone on this list, I created a bash script that runs once a day to do the following: # set path to final destination location=/Volumes/foo/sql_dumps/ # set

My backup scripts and how reliable are they?

2004-02-26 Thread Scott Haneda
As per the reco of someone on this list, I created a bash script that runs once a day to do the following: # set path to final destination location=/Volumes/foo/sql_dumps/ # set db_list to the list of databases db_list=`echo show databases | /usr/local/mysql/bin/mysql -N -u -p` for db

My backup scripts and how reliable are they?

2004-02-26 Thread Scott Haneda
As per the reco of someone on this list, I created a bash script that runs once a day to do the following: # set path to final destination location=/Volumes/foo/sql_dumps/ # set db_list to the list of databases db_list=`echo show databases | /usr/local/mysql/bin/mysql -N -u -p` for db

Backup Scripts

2001-08-05 Thread Leon D. McClatchey
Hello:-) A few days ago, I saw a lot of questions (and solutions) to backing up Mysql Databases and tables. One question kind of struck me and I did come up with a little python script if anyone is interested that is able to backup and/or restore the entire Mysql set of Databases. This is