backup question: INSERT statements

2004-09-28 Thread Neil Zanella

Hello,

I need to backup a mysql database in such a way that the output is
simply a bunch of insert statements. I do not want the database
schema as output as well: just the insert statements. This is
because I already have a script with CREATE statements and
would like to rebuild the database from scratch: since I
need to modify the schema and table structure I prefer
this approach than using ALTER TABLE, given that the
database data size is small and rebuilding from
scratch could add some efficiency.

So how do I get this with myqldump. I just want the
insert statements and the data.

Thanks!!!

Neil


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: backup question: INSERT statements

2004-09-28 Thread Paul DuBois
At 19:47 -0230 9/28/04, Neil Zanella wrote:
Hello,
I need to backup a mysql database in such a way that the output is
simply a bunch of insert statements. I do not want the database
schema as output as well: just the insert statements. This is
because I already have a script with CREATE statements and
would like to rebuild the database from scratch: since I
need to modify the schema and table structure I prefer
this approach than using ALTER TABLE, given that the
database data size is small and rebuilding from
scratch could add some efficiency.
So how do I get this with myqldump. I just want the
insert statements and the data.
mysqldump --help shows:
  -t, --no-create-info
  Don't write table creation info.
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Backup question.

2003-11-18 Thread Paco Martinez
Is there any problem executing rsync /var/lib/mysql/data/ from one host to
another host and therefore having same file in obth machines??

Is it unsafe this method ??

Could be crashed meanwhile transferring ??

Thanks !!!

- Original Message - 
From: Christensen, Dave [EMAIL PROTECTED]
To: 'Richard Reina' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 10:20 PM
Subject: RE: Backup question.


 Yes, you can do it like this:


 Prompt mysqldump --add-drop-table --host=source.IP.addr.spec -uuser
 -ppassword databasename | mysql -uuser -ppassword



 I've found that it helps things if you add --no-data to the source side on
 the first pass, then remove that clause and run it again.

 Dave

 -Original Message-
 From: Richard Reina [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 12, 2003 3:54 PM
 To: [EMAIL PROTECTED]
 Subject: Backup question.


 I would like to backup databases from a linux MySQL server to another
 linux machine on the same private network but I don' see in the docs how
 I can do this with mysqlhotcopy or mysqldump.  Is there any way to do
 this besides using ftp.

 Any help would be appreicated.

 Richard


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Backup question.

2003-11-18 Thread Simon Green
Has any one use LVM to take a snapshot in MySQL and use this to back up
data?

Simon

-Original Message-
From: Paco Martinez [mailto:[EMAIL PROTECTED]
Sent: 18 November 2003 10:00
To: Christensen, Dave; 'Richard Reina'; [EMAIL PROTECTED]
Subject: Re: Backup question.


Is there any problem executing rsync /var/lib/mysql/data/ from one host to
another host and therefore having same file in obth machines??

Is it unsafe this method ??

Could be crashed meanwhile transferring ??

Thanks !!!

- Original Message - 
From: Christensen, Dave [EMAIL PROTECTED]
To: 'Richard Reina' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 10:20 PM
Subject: RE: Backup question.


 Yes, you can do it like this:


 Prompt mysqldump --add-drop-table --host=source.IP.addr.spec -uuser
 -ppassword databasename | mysql -uuser -ppassword



 I've found that it helps things if you add --no-data to the source side on
 the first pass, then remove that clause and run it again.

 Dave

 -Original Message-
 From: Richard Reina [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 12, 2003 3:54 PM
 To: [EMAIL PROTECTED]
 Subject: Backup question.


 I would like to backup databases from a linux MySQL server to another
 linux machine on the same private network but I don' see in the docs how
 I can do this with mysqlhotcopy or mysqldump.  Is there any way to do
 this besides using ftp.

 Any help would be appreicated.

 Richard


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Backup question.

2003-11-18 Thread Paco Martinez
Just me has access to that machine...

And there's no LVM.


- Original Message - 
From: Simon Green [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 11:12 AM
Subject: RE: Backup question.


 Has any one use LVM to take a snapshot in MySQL and use this to back up
 data?

 Simon

 -Original Message-
 From: Paco Martinez [mailto:[EMAIL PROTECTED]
 Sent: 18 November 2003 10:00
 To: Christensen, Dave; 'Richard Reina'; [EMAIL PROTECTED]
 Subject: Re: Backup question.


 Is there any problem executing rsync /var/lib/mysql/data/ from one host
to
 another host and therefore having same file in obth machines??

 Is it unsafe this method ??

 Could be crashed meanwhile transferring ??

 Thanks !!!

 - Original Message - 
 From: Christensen, Dave [EMAIL PROTECTED]
 To: 'Richard Reina' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, November 12, 2003 10:20 PM
 Subject: RE: Backup question.


  Yes, you can do it like this:
 
 
  Prompt mysqldump --add-drop-table --host=source.IP.addr.spec -uuser
  -ppassword databasename | mysql -uuser -ppassword
 
 
 
  I've found that it helps things if you add --no-data to the source side
on
  the first pass, then remove that clause and run it again.
 
  Dave
 
  -Original Message-
  From: Richard Reina [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, November 12, 2003 3:54 PM
  To: [EMAIL PROTECTED]
  Subject: Backup question.
 
 
  I would like to backup databases from a linux MySQL server to another
  linux machine on the same private network but I don' see in the docs how
  I can do this with mysqlhotcopy or mysqldump.  Is there any way to do
  this besides using ftp.
 
  Any help would be appreicated.
 
  Richard
 
 
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/[EMAIL PROTECTED]
 
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Backup question.

2003-11-18 Thread Bernard Clement

rsynch will do the job correctly only and only if the mysql server on both 
sides are not running.  Rsynch does not deal with files opened for writing 
and my guess is that MySQL is opening the database (i.e. files) for writing.

As for LVM (AKA Logical Volume Manager) I really do not see how it could be 
used to take a snapshot in MySQL.  However, I could be wrong here.

Bernard


On Tuesday 18 November 2003 05:12, Simon Green wrote:
 Has any one use LVM to take a snapshot in MySQL and use this to back up
 data?

 Simon

 -Original Message-
 From: Paco Martinez [mailto:[EMAIL PROTECTED]
 Sent: 18 November 2003 10:00
 To: Christensen, Dave; 'Richard Reina'; [EMAIL PROTECTED]
 Subject: Re: Backup question.


 Is there any problem executing rsync /var/lib/mysql/data/ from one host
 to another host and therefore having same file in obth machines??

 Is it unsafe this method ??

 Could be crashed meanwhile transferring ??

 Thanks !!!

 - Original Message -
 From: Christensen, Dave [EMAIL PROTECTED]
 To: 'Richard Reina' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, November 12, 2003 10:20 PM
 Subject: RE: Backup question.

  Yes, you can do it like this:
 
 
  Prompt mysqldump --add-drop-table --host=source.IP.addr.spec -uuser
  -ppassword databasename | mysql -uuser -ppassword
 
 
 
  I've found that it helps things if you add --no-data to the source side
  on the first pass, then remove that clause and run it again.
 
  Dave
 
  -Original Message-
  From: Richard Reina [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, November 12, 2003 3:54 PM
  To: [EMAIL PROTECTED]
  Subject: Backup question.
 
 
  I would like to backup databases from a linux MySQL server to another
  linux machine on the same private network but I don' see in the docs how
  I can do this with mysqlhotcopy or mysqldump.  Is there any way to do
  this besides using ftp.
 
  Any help would be appreicated.
 
  Richard
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/[EMAIL PROTECTED]
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:   
  http://lists.mysql.com/[EMAIL PROTECTED]

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Backup question.

2003-11-18 Thread Bernard Clement

I think that it is more than backing up the database you want to do.  If I am 
right you want to synchronize the 2 databases in which case the answer is 
replication.  Replication is described in the reference manual of MySQL.

Bernard

On Tuesday 18 November 2003 04:59, Paco Martinez wrote:
 Is there any problem executing rsync /var/lib/mysql/data/ from one host
 to another host and therefore having same file in obth machines??

 Is it unsafe this method ??

 Could be crashed meanwhile transferring ??

 Thanks !!!

 - Original Message -
 From: Christensen, Dave [EMAIL PROTECTED]
 To: 'Richard Reina' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, November 12, 2003 10:20 PM
 Subject: RE: Backup question.

  Yes, you can do it like this:
 
 
  Prompt mysqldump --add-drop-table --host=source.IP.addr.spec -uuser
  -ppassword databasename | mysql -uuser -ppassword
 
 
 
  I've found that it helps things if you add --no-data to the source side
  on the first pass, then remove that clause and run it again.
 
  Dave
 
  -Original Message-
  From: Richard Reina [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, November 12, 2003 3:54 PM
  To: [EMAIL PROTECTED]
  Subject: Backup question.
 
 
  I would like to backup databases from a linux MySQL server to another
  linux machine on the same private network but I don' see in the docs how
  I can do this with mysqlhotcopy or mysqldump.  Is there any way to do
  this besides using ftp.
 
  Any help would be appreicated.
 
  Richard
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/[EMAIL PROTECTED]
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:   
  http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Backup question.

2003-11-18 Thread Joseph Bueno
Bernard Clement wrote:
rsynch will do the job correctly only and only if the mysql server on both 
sides are not running.  Rsynch does not deal with files opened for writing 
and my guess is that MySQL is opening the database (i.e. files) for writing.

It will work without stopping mysql server if you make sure that all 
data in memory are flushed to disc and mysql server does not modify 
these files while you read them.
This can be done with:
FLUSH TABLES WITH READ LOCK

NB: I assume that you run mysql server on main server only (not on 
backup server). If you have mysql server on both systems you can also
use mysql built-in replication : set your main server as master and
the backup server as a slave.

As for LVM (AKA Logical Volume Manager) I really do not see how it could be 
used to take a snapshot in MySQL.  However, I could be wrong here.

MySQL manual describes how to make a snapshot with Veritas filesystem
(vxfs). I am sure that it could be done in the same way with LVM (but I
haven't tried it myself):
If you are using a Veritas filesystem, you can do:
   1. From a client (or Perl), execute: FLUSH TABLES WITH READ LOCK.
   2. From another shell, execute: mount vxfs snapshot.
   3. From the first client, execute: UNLOCK TABLES.
   4. Copy files from snapshot.
   5. Unmount snapshot. 
(from : http://www.mysql.com/doc/en/Backup.html)
Bernard

Hope this helps,
Joseph Bueno
On Tuesday 18 November 2003 05:12, Simon Green wrote:

Has any one use LVM to take a snapshot in MySQL and use this to back up
data?
Simon

-Original Message-
From: Paco Martinez [mailto:[EMAIL PROTECTED]
Sent: 18 November 2003 10:00
To: Christensen, Dave; 'Richard Reina'; [EMAIL PROTECTED]
Subject: Re: Backup question.
Is there any problem executing rsync /var/lib/mysql/data/ from one host
to another host and therefore having same file in obth machines??
Is it unsafe this method ??

Could be crashed meanwhile transferring ??

Thanks !!!

- Original Message -
From: Christensen, Dave [EMAIL PROTECTED]
To: 'Richard Reina' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 10:20 PM
Subject: RE: Backup question.

Yes, you can do it like this:

Prompt mysqldump --add-drop-table --host=source.IP.addr.spec -uuser
-ppassword databasename | mysql -uuser -ppassword


I've found that it helps things if you add --no-data to the source side
on the first pass, then remove that clause and run it again.
Dave

-Original Message-
From: Richard Reina [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 3:54 PM
To: [EMAIL PROTECTED]
Subject: Backup question.
I would like to backup databases from a linux MySQL server to another
linux machine on the same private network but I don' see in the docs how
I can do this with mysqlhotcopy or mysqldump.  Is there any way to do
this besides using ftp.
Any help would be appreicated.

Richard

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:   
http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Backup question.

2003-11-13 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Richard --

...and then Richard Reina said...
% 
% I would like to backup databases from a linux MySQL server to another 
% linux machine on the same private network but I don' see in the docs how 
% I can do this with mysqlhotcopy or mysqldump.  Is there any way to do 

What about, on machine two, 

  mysqldump -hmachine1 -uuser -ppassword --opt --all-databases  backup

or so?


% this besides using ftp.

Definitely.  There's scp, for instance ;-)


% 
% Any help would be appreicated.
% 
% Richard


HTH  HAND

:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE/tEy5Gb7uCXufRwARAt0OAJ9INCSlHJTSEBUCiwvuhRq1IWpZGgCgtYd+
zP1J+2ryYcQIBSiWlGJq2TU=
=eryB
-END PGP SIGNATURE-

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Backup question.

2003-11-12 Thread Richard Reina
I would like to backup databases from a linux MySQL server to another 
linux machine on the same private network but I don' see in the docs how 
I can do this with mysqlhotcopy or mysqldump.  Is there any way to do 
this besides using ftp.

Any help would be appreicated.

Richard

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Backup question.

2003-11-12 Thread Victor Pendleton
mysqldump -uname -ppassword -BDatabase | mysql -uname -ppasswrod -Ddatabase
-hremotehost


-Original Message-
From: Richard Reina [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 3:54 PM
To: [EMAIL PROTECTED]
Subject: Backup question.


I would like to backup databases from a linux MySQL server to another 
linux machine on the same private network but I don' see in the docs how 
I can do this with mysqlhotcopy or mysqldump.  Is there any way to do 
this besides using ftp.

Any help would be appreicated.

Richard


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Backup question.

2003-11-12 Thread Christensen, Dave
Yes, you can do it like this:


Prompt mysqldump --add-drop-table --host=source.IP.addr.spec -uuser
-ppassword databasename | mysql -uuser -ppassword



I've found that it helps things if you add --no-data to the source side on
the first pass, then remove that clause and run it again.

Dave

-Original Message-
From: Richard Reina [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 3:54 PM
To: [EMAIL PROTECTED]
Subject: Backup question.


I would like to backup databases from a linux MySQL server to another 
linux machine on the same private network but I don' see in the docs how 
I can do this with mysqlhotcopy or mysqldump.  Is there any way to do 
this besides using ftp.

Any help would be appreicated.

Richard


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Database Backup Question

2003-02-17 Thread Loren McDonald

This is actually more a PHP question but since it refers to a MySQL
database I thought I would ask here.
I may not be looking in the right places but, I can't seem to find a way
to do a database backup through PHP (other than BACKUP TABLE, which I
don't want to use if possible)

What I mean is this:  I want to create a page that will allow me to
click one button to initiate a backup process.  That action will then
start a dump of a specified database to a text file that could then be
shown on a succeeding (success) page as a link for download (If there's
a way to zip prior to downloading, which would be even better).  I
intend on using this as a manual backup process, so I want it to work
like the mysqldump.exe or mysqlhotcopy.exe.  (All the tables are MyISAM)

The only way I see this working would be to write in PHP a long script
that will manually create that dump file itself by using SELECT and so
forth.  This seems a bit redundant and extravagant a way to go. 

Any help would be appreciated.

-- 
Loren McDonald
[EMAIL PROTECTED]




-
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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Database Backup Question

2003-02-17 Thread KH Chiu
Sorry I am in a bit hurry and just post some hints on your question. It is 
more than one way to do your job. One of the trival way is to use php 
function 'exec'. This function can execute shell programs. It means that you 
can execute mysqldump etc. and create dump file.

From my experience, you should exp. with exec for a while to get thru. all 
the tricks like trustee and getting output back.

You should also zip or bzip the file using similar technique.

File download is trival.

If you need further help, you may let you know.

Regards,

 This is actually more a PHP question but since it refers to a MySQL
 database I thought I would ask here.
 I may not be looking in the right places but, I can't seem to find a 
 way to do a database backup through PHP (other than BACKUP TABLE,
  which I don't want to use if possible)
 
 What I mean is this:  I want to create a page that will allow me to
 click one button to initiate a backup process.  That action will then
 start a dump of a specified database to a text file that could then 
 be shown on a succeeding (success) page as a link for download (If there's
 a way to zip prior to downloading, which would be even better).  I
 intend on using this as a manual backup process, so I want it to work
 like the mysqldump.exe or mysqlhotcopy.exe.  (All the tables are 
 MyISAM)
 
 The only way I see this working would be to write in PHP a long 
 script that will manually create that dump file itself by using 
 SELECT and so forth.  This seems a bit redundant and extravagant a 
 way to go. 
 
 Any help would be appreciated.
 
 -- 
 Loren McDonald
 [EMAIL PROTECTED]
 
 -
 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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.com


-
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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Database Backup Question

2003-02-17 Thread Loren McDonald
That's exactly what I was looking for and the way I hoped it could be
done, only I hadn't seen anything about this 'exec' function.

Thanks. I should be able to figure it out myself but I will get back
with you if I need further help.

-- 
Loren McDonald AKA MisterrMac
Gods Of Music Reviewer/Editor
[EMAIL PROTECTED]
http://www.GodsOfMusic.com


-Original Message-
From: KH Chiu [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 17, 2003 9:19 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Database Backup Question

Sorry I am in a bit hurry and just post some hints on your question. It
is 
more than one way to do your job. One of the trival way is to use php 
function 'exec'. This function can execute shell programs. It means that
you 
can execute mysqldump etc. and create dump file.

From my experience, you should exp. with exec for a while to get thru.
all 
the tricks like trustee and getting output back.

You should also zip or bzip the file using similar technique.

File download is trival.

If you need further help, you may let you know.

Regards,

 This is actually more a PHP question but since it refers to a MySQL
 database I thought I would ask here.
 I may not be looking in the right places but, I can't seem to find a 
 way to do a database backup through PHP (other than BACKUP TABLE,
  which I don't want to use if possible)
 
 What I mean is this:  I want to create a page that will allow me to
 click one button to initiate a backup process.  That action will then
 start a dump of a specified database to a text file that could then 
 be shown on a succeeding (success) page as a link for download (If
there's
 a way to zip prior to downloading, which would be even better).  I
 intend on using this as a manual backup process, so I want it to work
 like the mysqldump.exe or mysqlhotcopy.exe.  (All the tables are 
 MyISAM)
 
 The only way I see this working would be to write in PHP a long 
 script that will manually create that dump file itself by using 
 SELECT and so forth.  This seems a bit redundant and extravagant a 
 way to go. 
 
 Any help would be appreciated.
 
 -- 
 Loren McDonald
 [EMAIL PROTECTED]
 





-
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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Backup Question.

2001-12-31 Thread Richard Reina

I am running mysql on a linux box RH 6.2.   I backup all the filesytems 
with:

/sbin/dump 0ubf 800 /dev/npt0

to a COLORADO 8gig. travan tape drive.  Is this sort of backup regimen a 
good one -- compatible with MySQL -- or should I instead be backing up 
with FLUSH and (or) mysqldump?

Any help would be greatly appreciated.


Richard  


-
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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Backup Question.

2001-12-31 Thread David J Jackson

Richard --
You could do both, I would be a lot quicker to import data than  restore 
from tape. Say do an incremental dump back to your last level 0. Which
would be helpfull to developers as well as youself. You could also use
a seperate partition for the data directory and back that up.

The subject of backups falls under the same catagory  as: sport,relegion and 
politics isn't discussed in polite company.

Have I confused you yet :)
David


 I am running mysql on a linux box RH 6.2.   I backup all the filesytems
  with:
 
 /sbin/dump 0ubf 800 /dev/npt0
 
 to a COLORADO 8gig. travan tape drive.  Is this sort of backup regimen
 a  good one -- compatible with MySQL -- or should I instead be backing
 up  with FLUSH and (or) mysqldump?
 
 Any help would be greatly appreciated.
 
 
 Richard  
 
 
 -
 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
 [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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Backup question

2001-09-10 Thread Kraa de Simon

Hi,

I'm running MySQL on a NT box and do a nightly backup of the complete file
system to tape.

I know I should use mysqldump and probably stop MySQL but will a file system
copy do as well? The system is inactive at the time.

Met vriendelijke groet / With kind regards,

ICL Nederland B.V.  Simon de Kraa
e-Applications / Logistic Systems   Systems Architect
Het Kwadrant 1  Tel. +31 346 598865
Postbus 4000Fax  +31 346 562703
3600 KA  MAARSSEN
The Netherlands mailto:[EMAIL PROTECTED]

---

Progress 9.1b, Roundtable 9.1c, NuSphere Pro Advantage 2.2 @ MS Windows 2000
5.00.2195 SP 2
Progress 9.1b @ SCO UnixWare 7.1.1

-
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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Backup question

2001-09-10 Thread SidY



Howdy,

I tend to do both a dump to disk and then stop the DB and do a tape backup.
I don't believe there is an Online backup capability as user transactions
would need to be stored and played back against the DB after the backup as
in most production ready DB's.

Sid Young
QML Pathology
Database Administrator


 -Original Message-
 From: Kraa de Simon [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, September 10, 2001 5:47 PM
 To:   '[EMAIL PROTECTED]'
 Subject:  Backup question
 
 Hi,
 
 I'm running MySQL on a NT box and do a nightly backup of the complete file
 system to tape.
 
 I know I should use mysqldump and probably stop MySQL but will a file
 system
 copy do as well? The system is inactive at the time.
 
 Met vriendelijke groet / With kind regards,
 
 ICL Nederland B.V.  Simon de Kraa
 e-Applications / Logistic Systems   Systems Architect
 Het Kwadrant 1  Tel. +31 346 598865
 Postbus 4000Fax  +31 346 562703
 3600 KA  MAARSSEN
 The Netherlands mailto:[EMAIL PROTECTED]
 
 ---
 
 Progress 9.1b, Roundtable 9.1c, NuSphere Pro Advantage 2.2 @ MS Windows
 2000
 5.00.2195 SP 2
 Progress 9.1b @ SCO UnixWare 7.1.1
 
 -
 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 [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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Newbie Backup Question

2001-06-12 Thread Philip Mak

I'm trying to write a cron job to back up my databases. The manual says:

 Do a full backup of your databases:

 shell mysqldump --tab=/path/to/some/dir --opt --full

 You can also simply copy all table files (`*.frm', `*.MYD' and`*.MYI'
 files), as long as the server isn't updating anything.The script
 mysqlhotcopy does use this method.

My question is, is it safe to use mysqldump to back up the database when
updates are occuring?

If not, how do I use mysqlhotcopy to back up every database, without
having to keep track of what the names of my databases are? The perldoc
for mysqlhotcopy shows that it needs a database name.

-Philip Mak ([EMAIL PROTECTED])


-
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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




backup question

2001-01-15 Thread sanaa

hi 
I want to know how to backup and restore databases in mysql.


thanks for help

-
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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




backup question

2001-01-15 Thread sanaa


hi

i have a problem and i hope somebody can help me.
I use mysql-2.23.25 ( for windows).
I have my database in (c:) and i want to backup it in (d:) . 

thanks and regards

-
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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php