On Tue, 14 Dec 2004 17:21:04 +0200, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
> Thanks but I don't have access to MySQL nor to the client that makes the
> update. I don't even know if it locks the tables or not.
> 
> I would like to just copy some files in order to create a backup but I don't
> want to copy them while they are locked.
> However, I don't know if this is possible, because now I am thinking that if
> my program starts copying the files, they might start beeing updated just
> after I have started the copy process...
> 
> Teddy
> 

Copying the files is tricky,  for the reasons you stated.  Also, 
while the files protect against data issues, they will not protect you
against system failue:  The files are not bianry compatible between
different versions of mysql.  If you were to have hard drive failure,
etc., you would have to be sure that you reinstalled exactly the same
version, or you would lose all your data.  Since many people take
system failures as an opportunity to upgrade the software as well as
the hardware...

If you really, really need copies of the files for some reason, the
only way to guarantee integrity is to makes the copies while the mysql
server process is not running.  wait until a low traffic time, stop
the server, make your copies, and restart the server.

The best way, however is to use write a script to back up the data,
rather than the binary file, or use one of the tools desgned
specifically for that purpose.  If you can read the root and
mysql-owned protected files, you should be able to access the data
base.  If you really don't have access, you should 1) rethink your
security strategy: anyone who can read the files can fairly easily
extract the data, so if you can copy the files, there's no earthly
reason for you not to have select privs on the database, and 2) just
give your DBA a shell account, and let him/her make the backup.  But
whatever you do, take the database off line before you copy the files,
or you will end up with useless backups.

HTH,

--jay

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Reply via email to