Forum Moderators: bakedjake

Message Too Old, No Replies

How to Zip public html files . then move them

.. and make sure I don't delete them

         

old_expat

11:33 am on Jul 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm moving a few sites to a server without a control panel, so I need to create .zip files of each public_html directory.

Then I want to move the zipped files directly to the new server .. reason .. really slow connection to desktop and I get packet loss.

Lets say Server1/username moved to Server2 /username

I have root access and SSH access.

Frank_Rizzo

7:53 pm on Jul 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well if you know how to zip (or TAR would be better) then just ftp or scp (secure) the files across.

If your sites are all in the same sort of structure then do it with one file:

e.g.

/home/site1/public_html
/home/site2/public_html
/home/site3/public_html

cd /home
tar -cvf old_sites.tar *

gzip old_sites.tar

scp old_sites.tar.gz username@newsite.com:/home

on the new server the old_sites.tar.gz should be in /home

cd /home

gunzip old_sites.tar.gz

tar -xvf old_sites.tar /home/

old_expat

2:00 am on Jul 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello Frank_Rizzo,

Thank you!

Now I'll go look up all those parts of the command I don't understand. That tends to be the way this old noobie learns.;)