Copying the database files?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Copying the database files?

Postby Gladius » 30. August 2007 19:48

I'm doing some local testing and I was wondering if for backing up only one specific database it'd be enough to just keep a copy of that database's directory & files (from the xampp\mysql\data\ directory) and just restore that whenever I wanted to test with the original database contents again? Basically, I'm wondering if only copying the database files and overwriting all changed files with the original ones when I want to get the initial database contents back would work?

It'd save some time not having to dump and re-import the database every time, but I thought I'd ask here in case this wouldn't work for some reason.
Gladius
 
Posts: 3
Joined: 30. August 2007 19:32

Postby Smackie » 31. August 2007 04:48

Gladius

If I am understanding you right you want to copy the files from the mysql\data directory say you had a database called main and you copied that file and put it somewhere incase one of your users screws up the text or deleted the members and you didn't want to find the sql's and have to go all the way into the database and insert the whole sql you want to just take that main file and put it into the directory and over write the one that was already there?

well then that will work...

Smackie

(sorry for so sloppy lol i been busy building sites lol and tired of doing things neat lol)
Smackie
 
Posts: 27
Joined: 21. August 2007 03:13

Postby Gladius » 31. August 2007 15:26

Yea, it's a bit complicated to explain but the idea is very simple; in case something screwed up in the database, I'd just delete the "xyz" database directory (say mysql\data\xyz) and copy the "xyz" directory I've backed up (say, a week ago) in its place.

So you're saying that would work?
Gladius
 
Posts: 3
Joined: 30. August 2007 19:32

Postby lyntuan » 01. September 2007 14:50

Gladius wrote:Yea, it's a bit complicated to explain but the idea is very simple; in case something screwed up in the database, I'd just delete the "xyz" database directory (say mysql\data\xyz) and copy the "xyz" directory I've backed up (say, a week ago) in its place.

So you're saying that would work?

Sure!
Last edited by lyntuan on 26. December 2008 13:49, edited 1 time in total.
AMPstart :: Launch a Portable Web Server
http://ampstart.com
----------------------------------------------------------
Please read Disclaimer section carefully before downloading
lyntuan
 
Posts: 104
Joined: 08. November 2006 00:21

Postby Gladius » 01. September 2007 15:42

Great, thanks!
Gladius
 
Posts: 3
Joined: 30. August 2007 19:32


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 69 guests