0

I want to switch from one server to another server. So I want to move with my current server's details with database details from existing server to another server. My existing ftp server type is "SSH".

I want to download database table of existing server using SSH from Linux Terminal. I can't understand how to do it as I am new and I have Linux environment and I don't know the cpanel with username and password, but I know the ftp username with password.

How to download the database tables using SSH from Linux terminal for moving from existing server to another new server. If any one knows about it, please give me your hand. Thanks.

1 Answer 1

2

"I know the ftp username with password" - If the system is set up properly, you should not have access to the database tables from where you are. Assuming for some wierd reason you ftp user has sufficient permissions to access the database then you'd need to use a tool designed to backup a database

You need the following things - you need to know what the database is. This isn't mentioned in the question. You need a piece of software that can dump out the database.

Assuming you're using mysql (and I need to to actually get any further here), you'd use mysqldump to dump the database mysqldump -u mysql_user -p [mysql_password] [database_name] > dumpfilename.sql

then restore it with the command line mysql client - SO covers this well but basically all you're doing is to run the dumped file as the user using it in the mysql client like so mysql -u mysql_user -p [mysql_password]< db_backup.dump

If you are unsure or lacking ANY of these elements, you're best off talking to your DBA or sysadmin. There's also similar questions on DB.SE and SO and I used this site as a basis for my answer (I don't condone the abuse of root accounts tho) and the mysql docs. These are worth looking at.

If you're not using Mysql, the appropriate tool can be found by googling <databasename> dump.

2
  • to follow up the mysqldump, an scp from source to destination ought to be good to transfer
    – Sathyajith Bhat
    Commented Apr 3, 2013 at 8:01
  • I think his "ftp server" is a shell server. Commented Apr 4, 2013 at 3:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .