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
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
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
-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
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
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
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
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 |
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
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
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
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
26 matches
Mail list logo