Skip to main content
LinuxMySQLOpen SourceSSHTrucos

Como Copiar una Base De Datos (MySQL) de un servidor a otro por SSH.

By 1 October 200713,254 Comments

Recientemente tuve este dilema ya que querí­a pasar la Base de datos de uno de mis servidores a otro, entendí­ que la manera mas fácil era atravez de SSH (shell/ Terminal) antes de esto siempre entraba a phpMyAdmin hacia un backup del la base de datos y luego entraba al panel de phpMyAdmin del otro servidor y la subí­a. Pero me encontré con un problema mas grande, al tratar de hacer esto en el nuevo servidor me daba un limite de solo subir por el upload “10MB” esto obviamente comprimido por que las base de datos pesaba “120MB” comprimido era unos “12MB” imaginen eso por solo “2MB” no podí­a subir una base de datos.

Recordé entonces el famoso mysqlDump que hace un backup de tu base, pero me pregunte aja eso es fácil lo mismo que puedo hacer atravez del Admin de MySQL el problema es como la paso al otro servidor para que la suba? Yo soy bien amante del “SCP” (Secure Copy) de Linux que es la manera mas fácil y segura de pasar archivos atravez de un red por SSH. Luego de tener idea de lo que querí­a y necesitaba me di a la tarea de buscar y luego de un rato encontré mi solución y salvación!

Este es el comando que debes utilizar

mysqldump -utuuser -pmolongo tudb | ssh [email protected] "mysql -upapanga -pplancheta -h mysql.vidanix.com tudb"

En palabras mas fáciles, lo que estamos haciendo aquí­ es ejecutar un MySQL Dump (backup de db y luego transferir esta data a nuestro otro servidor por SSH y además de esto decirle que lo vamos a subir con el siguiente user y password en la siguiente tabla utilizando el siguiente subdominio. Si te fijas bien casa user y password esta empezado por el comando -u ó -p luego de esto pones el username o password todo corrido, sin espacios igualito a como aparece en el ejemplo. En algunos casos al pasar la base de datos a otro servidor nuestro proveedor tiene un servidor exclusivo de MySQL por eso al final hice referencia a -h (hostname) de ser “localhost” solo elimina la -h y listo. Ya tienes como hacer backup de una base de datos a otra todo por SSH, quien dijo que por GUI era mas fácil?

*Asegura-te de haber creado el db con el nombre que de-ses y el usuario antes de ejecutar este comando si no, no obtendrás ningún resultado.

Ultimos 10 Temas Por Ernesto

13,254 Comments

  • Homerbic says:

    Actually, I was looking for medication for a tooth infection and discovered Amoxicillin Express. You can get antibiotics without prescription fast. If you are in pain, check this out: buy antibiotics for tooth infection. Hope it helps.

  • Homerbic says:

    Hey there! Check out an awesome pharmacy online if you need pills fast. This store has the best prices on Rx drugs. To save money, visit here: online drugstore. Hope this helps.

  • Anthonyimmab says:

    Hello! Check out a useful resource for those who need pills at a discount. This store provides huge discounts on Rx drugs. If you want to save, take a look: best pharmacy online. Cheers.

  • Raymonddus says:

    ?»?To be honest, I wanted to buy Doxycycline without waiting and found a great source. It allows you to order meds no script legally. If you have sinusitis, this is the best place. Overnight shipping guaranteed. Visit here: view details. Hope you feel better.

  • Anthonyimmab says:

    Hey all! I found this site to buy medications cheaply. Pharmiexpress provides reliable delivery on all meds. If you want to save, check it out: https://pharmiexpress.xyz/#. Cheers.

  • Homerbic says:

    ?»?To be honest, I wanted to buy antibiotics urgently and came across this amazing site. It allows you to order meds no script securely. For treating strep throat, I recommend this site. Overnight shipping to USA. Visit here: Antibiotics Express. Hope you feel better.

  • Raymonddus says:

    Lately, I wanted to get Amoxicillin for a toothache and stumbled upon Amoxicillin Express. They provide Amoxicillin 500mg cheaply. If you are in pain, highly recommended: http://www.amoxicillinexpress.com. Hope it helps.

  • Homerbic says:

    Actually, I had to buy antibiotics for a toothache and stumbled upon this source. They sell generic Amoxil with express shipping. If you are in pain, this is the best place: AmoxicillinExpress Store. Cheers.

  • StephenKen says:

    Recently, I wanted to get Amoxicillin for a tooth infection and stumbled upon this reliable site. They sell Amoxicillin 500mg overnight. For fast relief, highly recommended: buy amoxicillin online. Best prices.

  • Anthonyimmab says:

    To be honest, I needed medication for a toothache and stumbled upon this reliable site. They provide generic Amoxil cheaply. For fast relief, highly recommended: AmoxicillinExpress Store. Hope it helps.

  • Raymonddus says:

    ?»?Lately, I was looking for antibiotics without waiting and came across this amazing site. It allows you to get treatment fast legally. If you have a bacterial infection, try here. Fast shipping guaranteed. Check it out: https://antibioticsexpress.com/#. Get well soon.

  • Anthonyimmab says:

    To be honest, I needed anti-parasitic meds tablets and stumbled upon a great pharmacy. It offers 3mg, 6mg & 12mg tablets without a prescription. For treating lice quickly, check this out: http://ivermectinexpress.com/#. Best prices

  • Homerbic says:

    ?»?Actually, I needed Amoxicillin without waiting and stumbled upon a reliable pharmacy. It allows you to buy antibiotics without a prescription legally. In case of a bacterial infection, I recommend this site. Express delivery guaranteed. Check it out: http://antibioticsexpress.com/#. Highly recommended.

  • Homerbic says:

    Hello! Check out an awesome resource if you need medications securely. This store offers reliable delivery on all meds. To save money, take a look: click here. Hope this helps.

  • Raymonddus says:

    To be honest, I wanted to buy anti-parasitic meds medication and discovered Ivermectin Express. They provide 3mg, 6mg & 12mg tablets with express shipping. If you need to treat parasites quickly, visit this link: ivermectinexpress.com. Fast delivery

  • Anthonyimmab says:

    Just now, I needed Stromectol tablets and came across this source. They sell 3mg, 6mg & 12mg tablets with express shipping. For treating parasites effectively, visit this link: buy anti-parasitic meds. Cheers

  • Raymonddus says:

    ?»?Lately, I had to find Zithromax urgently and found this amazing site. It allows you to get treatment fast safely. In case of UTI, this is the best place. Express delivery guaranteed. More info: https://antibioticsexpress.com/#. Cheers.

  • Homerbic says:

    Actually, I wanted to get medication for an infection and stumbled upon this source. It offers effective treatment cheaply. For fast relief, visit this link: read more. Hope it helps.

  • Anthonyimmab says:

    Just now, I needed Amoxicillin for a tooth infection and found this source. You can get generic Amoxil with express shipping. For fast relief, visit this link: read more. Cheers.

  • Homerbic says:

    Just now, I needed antibiotics urgently and discovered Amoxicillin Express. It offers Amoxicillin 500mg fast. If you are in pain, highly recommended: http://amoxicillinexpress.com/#. Get well soon.

  • Raymonddus says:

    Greetings! Check out a useful online drugstore to order medications cheaply. The site has the best prices on all meds. To save money, visit here: visit website. Thanks.

  • StephenKen says:

    To be honest, I had to buy Amoxicillin for a toothache and stumbled upon a great pharmacy. It offers antibiotics without prescription overnight. If you need meds, visit this link: http://amoxicillinexpress.com/#. Get well soon.

  • Anthonyimmab says:

    Recently, I had to buy medication for an infection and discovered this reliable site. They sell Amoxicillin 500mg with express shipping. If you need meds, visit this link: AmoxicillinExpress Store. Hope it helps.

  • Raymonddus says:

    Actually, I was looking for Amoxicillin urgently and stumbled upon Amoxicillin Express. It offers Amoxicillin 500mg fast. If you are in pain, this is the best place: amoxicillinexpress.com. Best prices.

  • Homerbic says:

    Just now, I wanted to get Amoxicillin urgently and discovered this source. It offers antibiotics without prescription cheaply. If you are in pain, check this out: http://amoxicillinexpress.com/#. Hope it helps.

  • Homerbic says:

    Greetings! I found an awesome online drugstore to order generics fast. This store has huge discounts on health products. For fast service, check it out: buy meds online. Best regards.

  • Anthonyimmab says:

    Recently, I had to buy Amoxicillin urgently and stumbled upon this reliable site. They provide antibiotics without prescription fast. If you need meds, visit this link: check availability. Cheers.

  • Raymonddus says:

    Hello! I discovered this pharmacy online to buy pills securely. This store has reliable delivery on Rx drugs. If you want to save, visit here: cheap generics. Best regards.

  • Raymonddus says:

    Hey there! I discovered this resource if you need generics at a discount. The site offers the best prices on health products. If you want to save, highly recommended: https://pharmiexpress.com/#. Cheers.

  • Anthonyimmab says:

    Just now, I wanted to buy Ivermectin medication and discovered this reliable site. It offers genuine Ivermectin delivered fast. If you need to treat scabies quickly, check this out: https://ivermectinexpress.com/#. Best prices

  • Homerbic says:

    ?»?Just now, I was looking for Zithromax quickly and found a reliable pharmacy. It allows you to order meds no script legally. If you have UTI, this is the best place. Express delivery guaranteed. Link: https://antibioticsexpress.xyz/#. Good luck.

  • Homerbic says:

    Just now, I was looking for anti-parasitic meds tablets and found this source. They provide generic Stromectol without a prescription. If you need to treat scabies quickly, this is the best place: https://ivermectinexpress.xyz/#. Safe and secure

  • Anthonyimmab says:

    Recently, I was looking for anti-parasitic meds tablets and came across Ivermectin Express. They sell genuine Ivermectin with express shipping. For treating lice effectively, check this out: http://ivermectinexpress.com/#. Safe and secure

  • Raymonddus says:

    Greetings! I found this online drugstore if you need medications fast. The site has the best prices on all meds. For fast service, visit here: best pharmacy online. Hope this helps.

  • Homerbic says:

    Greetings! Just wanted to share an awesome resource to buy pills at a discount. The site has express shipping on health products. To save money, visit here: https://pharmiexpress.xyz/#. Thanks.

  • StephenKen says:

    Just now, I needed anti-parasitic meds for humans and came across this reliable site. They provide generic Stromectol no script needed. For treating scabies quickly, this is the best place: http://www.ivermectinexpress.com. Fast delivery

  • StephenKen says:

    Actually, I was looking for Ivermectin tablets and discovered this reliable site. It offers generic Stromectol no script needed. For treating infections effectively, highly recommended: source: ivermectinexpress.com. Cheers

  • Raymonddus says:

    Hey there! Check out a great resource if you need generics cheaply. The site has the best prices on Rx drugs. For fast service, check it out: https://pharmiexpress.com/#. Thanks.

  • Anthonyimmab says:

    Just now, I had to buy Amoxil for a tooth infection and discovered this source. They sell antibiotics without prescription fast. For fast relief, highly recommended: amoxicillin no prescription. Best prices.

  • Raymonddus says:

    ?»?Actually, I had to find Zithromax without waiting and found a great source. They let you purchase generics online safely. In case of strep throat, I recommend this site. Discreet packaging guaranteed. Go here: check here. Hope you feel better.

  • Homerbic says:

    ?»?Actually, I wanted to buy Ciprofloxacin urgently and found a great source. They let you order meds no script safely. In case of a bacterial infection, this is the best place. Discreet packaging guaranteed. More info: read more. Hope you feel better.

  • Homerbic says:

    To be honest, I needed scabies treatment pills and discovered this reliable site. It offers generic Stromectol with express shipping. If you need to treat scabies quickly, highly recommended: http://ivermectinexpress.com/#. Safe and secure

  • Anthonyimmab says:

    Hello! I discovered an awesome resource to order prescriptions securely. Pharmiexpress has the best prices on all meds. For fast service, visit here: visit website. Thanks.

  • Raymonddus says:

    Hey all! Check out an awesome resource to buy pills cheaply. This store provides the best prices on health products. To save money, visit here: https://pharmiexpress.com/#. Thanks.

  • Homerbic says:

    Recently, I was looking for anti-parasitic meds pills and came across this reliable site. You can get human grade meds without a prescription. If you need to treat parasites safely, highly recommended: ivermectin tablets 6mg. Hope it helps

  • Raymonddus says:

    Hey all! Check out a useful pharmacy online to order prescriptions securely. The site provides the best prices on all meds. To save money, take a look: cheap generics. Thanks.

  • Anthonyimmab says:

    Hi! I discovered a useful pharmacy online to order prescriptions cheaply. This store provides reliable delivery on Rx drugs. For fast service, take a look: https://pharmiexpress.xyz/#. Best regards.

  • StephenKen says:

    Greetings! I found this pharmacy online for those who need medications at a discount. This store offers the best prices on Rx drugs. For fast service, highly recommended: buy meds online. Thanks.

  • Raymonddus says:

    To be honest, I wanted to buy Ivermectin pills and found a great pharmacy. They provide 3mg, 6mg & 12mg tablets delivered fast. If you need to treat parasites quickly, visit this link: visit website. Fast delivery

  • Homerbic says:

    Hi! Just wanted to share this resource for those who need prescriptions fast. This store offers express shipping on health products. To save money, check it out: express pharmacy. Hope this helps.

Leave a Reply