![]() |
linux gurus, please give me syntax fro transfering files between 2 hosts
ok, I need to move my domain to another host....
and of course transfer ALL files and subdirectories from that one domain to my new host... (of course transfer them saving the same directory and subdirectories structure- I don't wanna have any 404s when I finally move my dns' to new host).. I have a SSH access to my NEW host... so, what is the command to transfer all files and subdirectories from that old host to new one (to, let's say home/klinton )... replies much appreciated :) |
fxp it
|
What control panel are you using on both hosts? You could have a problem if you're going from say Cpanel to Ensim or to Plesk. If you're using a straight redhat box on both, I can tell you the syntax.
|
panel on new host is cpanel, on the old host- plesk afair.
system on the new host- Redhat. |
transfer the tar
scp /home/klinton/oldstuff.tar [email protected]:/home/klinton/oldstuff.tar |
Quote:
|
Yes.
|
have your host move everything for you ?
|
You can either login to the new server via SSH/telnet and
retrieve the files from the old, ro you can login to the old server and send them to the new: To send the files from this server to the other: tar --gzip --preserve --same-owner --atime-preserve -cvf - | ssh user@host "cd /; tar --ungzip --preserve --same-owner --atime-preserve -xvf - or: To get the files and bring them to this server: ssh -l root 209.100.120.162 "cd /home2/goldstatsn/accs; tar --gzip --preserve --same-owner --atime-preserve -cvf - ." | tar --ungzip --preserve --same-owner --atime-preserve -xvf - That will copy the files. You'll need to set up the domains in the config files o control panel also. Webmin is the least painful control panel to use for this. You will then have paths to adjust in .htaccess files, cgi scripts, and php scripts. If you have ppassword files, message boards, databases, or other dynamically updated info, you have to do some wierd manipulations of the DNS so that you don't have people going to both servers for a couple of days due to DNS caching. |
you can also use ttcp
ttcp -r -p 30666 | tar xvpf - -C dirname (on the receiving side, which means attach to port 30666 and pipe all output to tar, also had to create the destination directory) tar -cf - -C dirname . | ttcp -t -p 30666 ip (this is on the sender side - means tar up the dir and pipe to ttcp, then ttcp is told to connect to port 30666 and... |
I use rsync. There is probably a couple of hundred ways to move the files over.
http://samba.anu.edu.au/rsync/examples.html |
Quote:
|
the last time I did this I used lftp across two bsd boxes....had my tech guy give me the syntax and bamm, was working like a charm...gotta have lftp installed on both sides, however I'm sure there are several ways to do this...
definitely get a tech guy to walk you through it, or hire someone to do it for ya... personally I like to learn and take notes once a month on new schtuff like that... |
All times are GMT -7. The time now is 09:20 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123