Reply to topic
How to move 5Gb site from Linux shared server to Windows VPS
leeflang


Joined: 16 Apr 2007
Posts: 4
Location: Dedham, MA - USA
Reply with quote
I got 5GB of files on a Yahoo WEbhosting based shared LInux server. Those file sneed to be moved to my new Windows 2003 VPS server here.

Is there any way to compress the files first and then move the compressed files direct between both servers? If so, what software would I need?
nathacof


Joined: 24 Oct 2006
Posts: 93
Location: Bear, DE
Reply with quote
Do you have shell access?

If you do login via SSH.

Once logged in you can execute the following command:
Code:

nathacof@dev:~$ which tar
/usr/bin/tar
nathacof@dev:~$


If your output looks similar then we can more than likely move forward. If at any time I reference a command you can execute 'which' to find out it's location, which can be useful when migrating to a new server. It's always useful to know where the systems standard perl executable is located.

Now that you have tar available to you to can archive and compress your website's data:
Code:

nathacof@dev:~$ tar -cvzf websiteBackup.tgz /var/www/htdocs/ >& backup.log

Note: Some servers may not support gzip, alternatively you can use bZip, but that's another post.

Now you have two files, one is a compressed archive of your website, 'websiteBackup.tgz', and then you have a record of all the files archived in 'backup.log'.

Lets look get a detailed look at these files with 'ls':
Code:

nathacof@dev:~$ ls -lh
total 2.3M
-rw-r--r-- 1 nathacof users  88K 2007-07-07 21:38 backup.log
drwxr-xr-x 2 nathacof users 4.0K 2007-06-13 22:15 backups/
drwxr-xr-x 2 nathacof users 4.0K 2007-07-04 23:23 bin/
drwxr-xr-x 2 nathacof users 4.0K 2007-04-30 23:44 cgi-bin/
drwxr-xr-x 2 nathacof users 4.0K 2007-04-30 15:01 doc/
drwxr-xr-x 2 nathacof users 4.0K 2007-06-26 18:41 download/
drwxr-xr-x 2 nathacof users 4.0K 2007-04-30 23:44 etc/
lrwxrwxrwx 1 nathacof users   16 2007-05-09 21:58 htdocs -> /var/www/htdocs//
drwxr-xr-x 2 nathacof users 4.0K 2007-05-01 00:14 logs/
-rw-r--r-- 1 nathacof users 2.2M 2007-07-07 21:38 websiteBackup.tgz
nathacof@dev:~$


Now I included the file 'backup.log' because it can be useful if you need to backup your website regularly. You can add this command directly to a cron job on a Linux server, once again a bit off topic.

In case some thing goes awry with your backup this will show you the last 10 lines of the backup log:
Code:

nathacof@dev:~$ tail backup.log
/var/www/htdocs/tutorials/edit.php
/var/www/htdocs/tutorials/search.php~
/var/www/htdocs/tutorials/browse.php~
/var/www/htdocs/tutorials/edit.php~
/var/www/htdocs/tutorials/template/
/var/www/htdocs/tutorials/template/index.php
/var/www/htdocs/tutorials/template/index.php~
/var/www/htdocs/.dbLogin.php.swo
/var/www/htdocs/.socket_tests.php.swp
/var/www/htdocs/socket_tests.php~
nathacof@dev:~$


Now you can download the compressed file to the Windows server using FTP. At this point you'll need a utility to decompress the archive. Reference, http://kb.iu.edu/data/adtw.html, for some examples.

For more information in regards to Linux Command line see, http://www.physics.ubc.ca/mbelab/computer/linux-intro/html/
How to move 5Gb site from Linux shared server to Windows VPS
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic