Welcome to WebmasterWorld Guest from 18.208.187.169

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

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 26, 2003
posts:705
votes: 0


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.

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 17, 2002
posts:1189
votes: 6


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/

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 26, 2003
posts:705
votes: 0


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