Home ›
Copy a database [file] from another serverCopy a database [file] from another server
Submitted by Kathleen Murtagh on June 9, 2009 - 10:48pm
On the original server, first backup it's database as described above. [server] is the domain name or IP address of the server you wish to copy from. [username] is the username to access the remote server.
While on the server you wish to copy to, and in the directory you want the file to reside:
$ scp [username]@[server]:/path/to/file/to/copy/[filename] ./[filename]
When prompted for a password, enter the root password for the original server
To reverse it, effectively pushing a file to a remote server you would reverse the above command:
$ scp [filename] [username]@[server]:/path/to/file/to/copy/[filename]