I was wondering if I have 2 server, old one and a new one, is it possible to use mysqldump and clone the old database
this way when i need to use a different server i can dump my files into the new one faster?
mysqy dump from one server into a new server?
Moderator: General Moderators
mysqy dump from one server into a new server?
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: mysqy dump from one server into a new server?
Code: Select all
mysqldump --whatever --options --you --need | gzip > filename.sql.gzTransfer the file, and
Code: Select all
gunzip filename.sql.gz -c | mysql --options...Re: mysqy dump from one server into a new server?
I have long ago learned to increase max_allowed_packet to be much larger, when using vast amounts of data it's a wise choicerequinix wrote:Tip: you probably want options to drop and re/create tables, possibly database(s) too, and if you have large blobs of data then you might need to increase max_allowed_packet.Code: Select all
mysqldump --whatever --options --you --need | gzip > filename.sql.gz
Transfer the file, andCode: Select all
gunzip filename.sql.gz -c | mysql --options...
as time goes by I am adding more capability to my website, limited time is the only problem
Code: Select all
sudo mysqldump -u root -p --all-databases | gzip > backup.sql.gz
--binary-mode is the best option for restoring a dump, in case you have a complex range of tables etc
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP