|
Re: Database Backup Question: msg#00092db.mysql.windows
Why you don't like BACKUP TABLE command? :-) To solve your problem you can do this: 1) backup selected tables to some empty directory. 2) zip all files in this directory using winzip on Windows or gzip/tar on Linux platform to the same directory. 3) open this zip file for reading a read and send it to client (browser). Offcourse, you must send correct header to browser first. 4) after sending is successful or connection is lost (user cancel connection or go to other page) delete all files in "backup" directory. >From user angle of view is situation simly. User click on "Backup" button and get backup.zip file for download. What you wish more? :-) If you wish to get data in CSV format (e.g. for using in Excel), you can use query SELECT * FROM anytable INTO OUTFILE 'somepath/somefile.csv' Petr Vileta, Czech Republic http://www.practisoft.cz ----- Original Message ----- From: "Loren McDonald" <MySQL-ML@xxxxxxxxxxxxxx> To: <win32@xxxxxxxxxxxxxxx> Sent: Tuesday, February 18, 2003 1:30 AM Subject: Database Backup Question > > 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 > mysql-ml@xxxxxxxxxxxxxx > > > > > --------------------------------------------------------------------- > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before > posting. To request this thread, e-mail win32-thread10560@xxxxxxxxxxxxxxx > > To unsubscribe, send a message to the address shown in the > List-Unsubscribe header of this message. If you cannot see it, > e-mail win32-unsubscribe@xxxxxxxxxxxxxxx instead. --------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail win32-thread10561@xxxxxxxxxxxxxxx To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail win32-unsubscribe@xxxxxxxxxxxxxxx instead. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Database Backup Question: 00092, Loren McDonald |
|---|---|
| Next by Date: | RE: MysqlDump question: 00092, Alan McDonald |
| Previous by Thread: | Database Backup Questioni: 00092, Loren McDonald |
| Next by Thread: | Re: Re: Database Backup Question: 00092, Ion Mihai Tetcu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |