Currently i'm using phpmyadmin to backup my database. But with a 75 mb gzipped database... the file always seems to get corrupted! About 25% of it is seen as "garbage" so i've been downloading the raw sql file uncompressed. When I do that, the server gets too stressed to even load my website (and downloading a 400 mb sql file takes around 20 minutes or so).
I don't really need to download the file. Just store it somewhere on my server. Is there a way to do a backup without putting so much stress on the server?
large db backup
Moderator: General Moderators
large db backup
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Why not shell in and simply:
or:
When backing up, if you want to make sure you have a consistant backup you may want to:
backup data in either two ways above then:
Code: Select all
mysqldump > backup-20060914.sqlCode: Select all
cp -a /var/lib/mysql /some/backup/path/20060914/Code: Select all
mysql> flush tables with read lock;Code: Select all
mysql> unlock tables;- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
If you don't have what Everah or ody mentioned, you can make a PHP script that backup only one table at a time.
If the table is too large, then you split the table to 3M-5M and like that you continue to backup your DB.
When you want to import it, you also import one table each time and then insert the data.
If the table is too large, then you split the table to 3M-5M and like that you continue to backup your DB.
When you want to import it, you also import one table each time and then insert the data.
I am trying out SQLyog, it looks nifty!
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA