Vcoderz Community
We create websites that have it all, beauty & brains
Lebanon Web Design & Development - Coddict
 

Go Back   Vcoderz Community > Computer Zone > Computers & Information Technologies

Notices

Computers & Information Technologies Everything related to computers and internet.

Reply
 
Share Thread Tools Search this Thread
Old 07-26-2010   #1
RUSSIAN
Registered Member
 
RUSSIAN's Avatar
 
Last Online: 08-06-2014
Join Date: Nov 2009
Posts: 568
Thanks: 838
Thanked 231 Times in 173 Posts
Groans: 23
Groaned at 16 Times in 13 Posts
Default Move a site to a new server

Hay all!
I need to move my site to a new server (one with unix installed). I can SSH to this server as a root. On the other one I have a site. I can only FTP to it.
So I want to move all folders & files from the old server to the new one without stupid downloading to my PC and then uploading to the server all that stuff. How to do that?


__________________
What about a 500+ symbols long, colored signature with URL allowed and size limited to 7?
RUSSIAN is offline   Reply With Quote
Old 07-26-2010   #2
Sheriff Ice
info@sync.com.lb
 
Sheriff Ice's Avatar
 
Last Online: 06-05-2018
Join Date: Apr 2006
Posts: 3,827
Thanks: 1,348
Thanked 2,391 Times in 1,306 Posts
Groans: 0
Groaned at 16 Times in 15 Posts
Default

zip the files/folders and download the compressed file from one server to another
__________________
http://www.gamync.com Lebanese Produced Mobiles Games by http://www.sync.com.lb
Sheriff Ice is offline   Reply With Quote
Old 07-26-2010   #3
Google

 
Google's Avatar
 
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
Default

On the server where you have SSH access
Put the website in a tar file:
Code:
tar -czvf /tmp/webisteFile.tar /var/www/websiteFolder/


On the server where you have FTP access
Upload the websiteFile.tar and the create a php script with the following content:
Code:
<?php
system("tar -xf websiteFile.tar");
echo "finished!";
?>

Put this script in the same directory as where you uploaded the tar file, and then execute it by accessing it through the web browser.

__________________


Last edited by Google; 07-27-2010 at 01:44 AM.
Google is offline   Reply With Quote
Old 07-26-2010   #4
xcoder
Ma ghayro
 
xcoder's Avatar
 
Last Online: 04-19-2018
Join Date: Dec 2005
Posts: 5,592
Thanks: 1,765
Thanked 4,201 Times in 2,361 Posts
Groans: 12
Groaned at 18 Times in 11 Posts
Default

Just copy the whole website through FTP, you don't even need to compress especially if your host doesn't support gzip or tar.

FTP the new host
We'll take vcoderz as an example
Open SSH and type these.

1 - cd /var/www/html/oldwebsite/
2 - ftp
3 - open vcoderz.com
4 - put username and password
5 - cd /var/www/html/newwebsite/
6 - prompt (to turn off prompt confirmation for each file transfer)
7 - mget *
__________________
http://twitter.com/danymoussa
xcoder is offline   Reply With Quote
The Following 2 Users Say Thank You to xcoder For This Useful Post:
Justin (07-26-2010), RUSSIAN (07-26-2010)
Old 07-26-2010   #5
RUSSIAN
Registered Member
 
RUSSIAN's Avatar
 
Last Online: 08-06-2014
Join Date: Nov 2009
Posts: 568
Thanks: 838
Thanked 231 Times in 173 Posts
Groans: 23
Groaned at 16 Times in 13 Posts
Default

Thank you all, I now will try xcoder's solution.
__________________
What about a 500+ symbols long, colored signature with URL allowed and size limited to 7?
RUSSIAN is offline   Reply With Quote
Reply

  Vcoderz Community > Computer Zone > Computers & Information Technologies

Tags
server, site



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:51 PM.


Lebanon web design and development
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Share