backups
Moderator: General Moderators
- elecktricity
- Forum Contributor
- Posts: 128
- Joined: Sun Sep 25, 2005 8:57 pm
- Location: Trapped in my own little world.
- Contact:
backups
whats the easiest way to make backups of big databases with php? I tried a few ideas but they didnt seem to work well they kept timing out ect? I dont want to install anything just something I can create with php or something else simple.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Using the results from SHOW DATABASES and SHOW TABLES, one can build a tree of how the tables are oriented. You can then use SHOW CREATE TABLE against these names to create the structure queries. Now you have to be careful of the tables using InnoDB as a storage engine as they could easily be dependent on another table existing first. ... Granted there are a few syntax ways around that.
After you export the structure, you can begin dumping the individual tables' data. I'd count the number of queries performed and try to chop them at a certain length and move to another file.
After you export the structure, you can begin dumping the individual tables' data. I'd count the number of queries performed and try to chop them at a certain length and move to another file.
- elecktricity
- Forum Contributor
- Posts: 128
- Joined: Sun Sep 25, 2005 8:57 pm
- Location: Trapped in my own little world.
- Contact:
- elecktricity
- Forum Contributor
- Posts: 128
- Joined: Sun Sep 25, 2005 8:57 pm
- Location: Trapped in my own little world.
- Contact:
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- elecktricity
- Forum Contributor
- Posts: 128
- Joined: Sun Sep 25, 2005 8:57 pm
- Location: Trapped in my own little world.
- Contact: