List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 26 1999 5:51pm
Subject:Re: diff between cping a databse and mysql dump
View as plain text  
>Hi,
>    I am using MySQL as the database for an online web logging/tracking
>system I have designed.  I am in the process
>of setting up a backup schedule ...(in case I do one of em acidental
>DELETEs I seen people do on here....) anyway I
>was wondering if just CPing the database files to a save directory is
>just as good and doing a MySQL data dump??
>Since I am still learning MySQL and I am very familiar with PERL and
>Unix I wrote a script thats just copies the database files to my save
>directory.  To you seasoned MySQL vets..... is this a good idea or
>should I be doing data dumps???

Files copied with cp are worthless for backups if the server happens
to be modifying them while you're copying them, or if the server
has unflushed changes that still haven't been written to disk.

If you bring the server down, then you can simply copy the files.
Otherwise, you're probably best off using mysqldump, which cooperates
with the server while performing the dump.  Check into using the
--opt (optimize dump) option.

-- 
Paul DuBois, paul@stripped
Thread
diff between cping a databse and mysql dumpDoug Chanco26 Oct
  • Re: diff between cping a databse and mysql dumpPaul DuBois26 Oct