Um its better to use the SQL backup table if the table is a myISAM
table.

BACKUP TABLE [tables] to [LOC].


Or a more sophisticated approach

FLUSH TABLE WITH READ LOCK;

Fork out copy myISAM datafile out

UNLOCK TABLES;


If it's innodb then use the innodb backup script offered by Heikki.
 

-----Original Message-----
From: Elim Qiu [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 06, 2004 9:44 AM
To: [EMAIL PROTECTED]
Subject: wanted: back up script

This is on windows 2000.
I did the following as a temp solution for the full back up of a
database. I know this is not safe and possibly not complete. Any
suggestions (how to lock/unlock a db for read here)?
Thanks

#include <stdio.h>
#include <stdlib.h>

int main() {
printf("start backup ESite data\n");
system("tar cf ESite_dt.tar F:/DBData/MySQLdata/ESite"); system("gzip
ESite_dt.tar"); system("mv ESite_dt.tar.gz ESite_dt.tgz");
printf("done\n"); return 1; }



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.6 - Release Date: 12/5/2004



-- 
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]

Reply via email to