GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   linux gurus, please give me syntax fro transfering files between 2 hosts (https://gfy.com/showthread.php?t=251241)

klinton 03-12-2004 08:58 AM

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 :)

masta flash 03-12-2004 08:58 AM

fxp it

dougeetx 03-12-2004 08:59 AM

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.

klinton 03-12-2004 09:02 AM

panel on new host is cpanel, on the old host- plesk afair.
system on the new host- Redhat.

Jizar II 03-12-2004 09:14 AM

transfer the tar
scp /home/klinton/oldstuff.tar [email protected]:/home/klinton/oldstuff.tar

klinton 03-12-2004 09:21 AM

Quote:

Originally posted by Jizar II
transfer the tar
scp /home/klinton/oldstuff.tar [email protected]:/home/klinton/oldstuff.tar

and when I untar this tar all files will have the same directory structure ?

Madball 03-12-2004 10:09 AM

Yes.

bagel 03-12-2004 10:31 AM

have your host move everything for you ?

raymor 03-12-2004 12:18 PM

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.

FrankWhite 03-12-2004 12:20 PM

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...

icedemon 03-12-2004 01:16 PM

I use rsync. There is probably a couple of hundred ways to move the files over.
http://samba.anu.edu.au/rsync/examples.html

EZRhino 03-12-2004 01:28 PM

Quote:

Originally posted by raymor
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.

Good advise, your host should have a tech available to help you out.

TheJimmy 03-12-2004 01:30 PM

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