hello sitepointers! I’m writing this as my last resort, I have completely exhausted myself trying to figure out how to do this, but I simply lack the experience to do this on my own so I ask for some if any help with the task.
what I’m trying to achieve is to move a plesk 8.6 client on one server to another server with plesk 9.0, both are separate linux machines on different IP addresses.
in reality all that I need to do is simply copy a videos folder and a photos folder from server to server.
doing this with FTP is unreasonable (I have tried) copying the files to my local pc and then to the other server will take about a week of non stop copying at my internet speed.
then I tried FXP, but all it did was create 0byte files on the new server.
I have tried to use the built in migration manager, but it “is not implemented yet” in Plesk 9.0.
I even found a guide on how to do it, but I do not understand what I need to do in the guide, I’m a total beginner with servers.
for example to move a client it says
~# /usr/local/psa/bin/pleskbackup clients CLIENT.LOGIN <backup-file>
but where do I write this, and how do I do it?
How should I do this server move?
and how do you do a Server-to-Server move anyway?
Use scp or rsync, transfer the files directly from one server to the other.
While SSHed in to the new server:
scp -r username@oldserver.com:/path/to/files/* /local/path/to/save/to/
You can save yourself some transfer time by compressing the files first, too.
What is scp and rsync? and how to I use them?
and how do i compress files on a server?
luckily i have already bumped into SSH (but never used it so far)
I gave an example of how to do it. If reading the manual and trying it is beyond your comfort level, you can always hire a system administrator for an hour.
Why so rude?
what have I done to you?
I just asked what it was…
I was not intending to be rude, very sorry. I was only giving a suggestion – I have used that company in the past before I was comfortable running my own servers
Oh sorry for the misunderstanding then, I must be increasingly tired from this…
I would use their service if I was not such a cheapskate hehe…
also I really want to achieve to do this at least once, myself, these type of problems have been bugging me for a year now and I have the increasing desire to finally understand how to do it.
I will provide my debugging experience for some future beginners reading this (and for experts amusement)… as in the future I will be unable to ask such stupid questions.
edit:
right now I have downloaded putty, and got the SSH details from the old and new server, but putty is not allowing me to type in the password, but I wont bother you with this silly stuff.
edit:
Oh it figures the password characters do not show while you type them.
I have connected to the old server which I knew will work for sure.
now to check if it has scp installed…
edit:
I guess SSH has scp program installed by default.
now to connect to the new server… works right away
(after enabling /bin/bash shell access with ftp credentials in the hosting setup of mydomain in plesk)
now to copy the files using:
scp -r username@oldserver.com:/var/www/vhosts/(my domain)/httpdocs/photos/* /var/www/vhosts/(my domain)/httpdocs/photos/
I got the directory names by using php’s getcwd
I’m just wondering, won’t the old server ask for a password too?
edit I’m guessing I do need a password as it’s throwing me a error
Could not create directory '/var/www/vhosts/mydomain.com/.ssh'.
The authenticity of host '123.123.123.123 (my ip)' can't be established.
(note: it figures it was a bug with some authentication and has nothing to do with passwords!! )
its also showing me a yes/no option, do i just type yes?
edit
I typed yes [enter]
and now it seems to be copying all the files, YESS!!! Thank you DAN!!
OK putty’s been doing something for hours…
this is what it looks like:
y
y
y
y
y
y
y
and the y’s keep appearing, at first I thought each y means a file copied, but now I’m unsure, because when i ftp to the new server i can’t see the old files copied.
is this normal?
That doesn’t look normal. The output from scp is the filename and the transfer progress, one line per file.
[root@copernicum /data/w3counter]# scp admin@awio.com:/home/backups/at_*.sql /tmp/
admin@awio.com’s password:
at_demo.sql 100% 41MB 1.2MB/s 00:37
at_awio.sql 82% 34MB 1.1MB/s 00:06 ETA
in the plesk cp i allowed ssh for this host with “/bin/bash” peronally I have no clue what this means, so I’m typing it just in case that’s whats wrong…
so I open putty, type the IP address of my new host, port 22, SSH
a black console window opens and says:
login as
i type in the username
then it asks password
I type in the password
It says
login as:admin
admin@123.123.123.123's password:
Last login: Tue Mar 16 00:02:02 2010 from 123.123.123.123
-bash-3.2$
i changed my ip to 123.123.123.123
then i type:
scp -r username@oldserver.com:/var/www/vhosts/(my domain)/httpdocs/test.txt /var/www/vhosts/(my domain)/httpdocs/test.txt
then it asks me for a password, and to confirm something with authenticity, so i type the password, and then yes
and the file copied fine, but when I try to copy a file from a folder to a non-existing folder in the new server, it fails, so scp does not create the necessary folders does it?
note:
yes, it copies folders too when using the * wildcard…
I tried the same thing i did again, and now its copying properly ??
I’m confused 
But at least now I’m sure its working 
thanks again for your patience Dan.
hi again, is there a way in scp to copy files that are missing or of different size?
I just want to make sure everything copied properly.