Server to Server transfer using ssh
Hey, i am moving my exiting website to another server, and i have shell access to both servers. How can transfer files from existing server to the new servers.
Hey, i am moving my exiting website to another server, and i have shell access to both servers. How can transfer files from existing server to the new servers.
Anonymous posted this at 09:07 — 10th December 2003.
They have: 5,633 posts
Joined: Jan 1970
Do you have a control panel?
If you have cpanel, you can get your host to do the transfer through WHM (in-built function).
If not, you can tar the files in the source folder, use
"scp " where destination is in the form [email protected]:/destinationfolder
try the man page for scp to know more.
atulb posted this at 13:48 — 10th December 2003.
They have: 3 posts
Joined: Dec 2003
Yea but how would you transfer whole folders instead of individual files.
Suzanne posted this at 16:02 — 10th December 2003.
She has: 5,507 posts
Joined: Feb 2000
Do you have CPanel?
Because you can backup your server to remote locations using CPanel, including another server. It will gzip the files (all of them) and then you can unzip them at the new location.
druagord posted this at 17:13 — 10th December 2003.
He has: 335 posts
Joined: May 2003
Or like headbuilder said tar your folder and transfer it using scp
atulb posted this at 19:31 — 10th December 2003.
They have: 3 posts
Joined: Dec 2003
I do havve cpnel but i dont know how to transfer using that. how do you make a tarball??
mairving posted this at 20:23 — 10th December 2003.
They have: 2,256 posts
Joined: Feb 2001
Usually what I do is to:
tar and gzip everything tar cvf - directory/ | gzip > directory.tar.gz
ftp to the site at the SSH shell prompt
ftp sitename or IP address
send the files mput directory.tar.gz
close ftp bye
SSH to the other server and uncompress them:
tar -xvzf directory.tar.gz
I really don't like using CPanel for transfers as it has a tendency to reset permissions.
Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.