• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

[Urgent Help] Need SSH Command ( Sql Backup)

Status
Not open for further replies.

rahulw

New Member
Hello Mates ,


I want to transfer a huge database (sql ) of 5 GB to other server ( Remote ) , but i do not know how to do it ! and later i want to restore it also on the 1st server after i format it !!

I know how to backup on my own server by using

mysqldump -q -uxyourdomain -p -hmysql.yourdomain.com xyourdomain_2 >./myfile.txt

But please help me in telling a command which can make MySql backup from DB to another server

and

a command which can restore MySql backup of DB to another server


Regards
 
I think that this was the command which will do the work is

mysqldump -f DB -u -p | ssh user@IP of NEW SERVER "( > /home/user/public_html/test.sql)"

but i am getting this error

mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 0 on write


Please help me asap :(



Regards
 
If this is what I think (a follow up to your other thread asking for temp space) then if your VPS is already broken so I doubt if any command you issue will work and also if another server will allow the command to access it.

Reason I asked why SSH on another backup account - it's not that easy.

With a DB that size have a solution in place before it breaks.

It may not be possible to backup due to the size required to be cached before transfer either.

You can try this I found which might help - http://bash.cyberciti.biz/backup/wizard-ftp-script.php

Hope you find something but that is one hell of a size of DB to leave to chance without backing up regularly. Lesson learned I hope?
 
If this is what I think (a follow up to your other thread asking for temp space) then if your VPS is already broken so I doubt if any command you issue will work and also if another server will allow the command to access it.

Reason I asked why SSH on another backup account - it's not that easy.

With a DB that size have a solution in place before it breaks.

It may not be possible to backup due to the size required to be cached before transfer either.

You can try this I found which might help - http://bash.cyberciti.biz/backup/wizard-ftp-script.php

Hope you find something but that is one hell of a size of DB to leave to chance without backing up regularly. Lesson learned I hope?


Chill man !! nothing is lost here :angel:
just asked for a command , if you know it well:evilb: else thnx:cool2:



hope someone will write the command soon !
 
Backup the database tar it then put it in a public HTTP dir and then useing the other server type
wget http:/<IpOrDomain>/file/mysql.tar.gz
Best I can think of, and if I understand correctly thats all you needed to do...
 
If you have root access to the server, just go into /var/lib/mysql and get the information that way. If you don't, phpMyAdmin or cPanel may be able to give you a backup.
 
From his other thread it suggested his VPS was broken due to running a shell command that CHMOD'd everything to 777 so various things were not working - not a lot of info from the OP so Tree's idea is probably best.
 
hey thanx for help , but its not that what all i need

and VPS is not broken , its kinda working .. but some services are not !!

anyways i know how to create TAR and all , but i do not have space left in old server to create any TAR or dump there

so i need a command which will directly create MYSQLDUMP to my new server !!

i hope my problem is known now !!

plz tell a command of mysqldump which gives its output in other server !!!

thnx
 
mysqldump -f DBname | ssh user@IP mysql DB Name

user@IP password: xxxx


stdin: is not a tty
ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: NO)
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 0 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write



i m getting this error ..
 
and VPS is not broken , its kinda working .. but some services are not !!

That's what I'm asking - what does work and there may be some way to do it, does your control panel work and which one?
If you don't have enough space to backup then move it then it would need remote MySQL access which again may not work.
 
Status
Not open for further replies.
Back
Top