Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th July 2008, 17:23
malinens malinens is offline
Member
 
Join Date: Jan 2008
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to move /var/www/ directory to another hard drive?

I have Ubuntu 7.10 server. I have mounted one hard disk to /var/www but this disk is almost full and I bought a new one. What should I do to safely copy files from old hard disk to new disk? New hard disk is at home but server is in data center. Can anyone give my step by step instructions to not to loose my data?

/Sorry for my crappy English/
Reply With Quote
Sponsored Links
  #2  
Old 24th July 2008, 17:44
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

If your new drive is mounted to your Linux pc or other server, you can do the following:

1) Login to your server via SSH with Putty.
2) Go to the directory /var/www:
cd /var/www

3) Copy the content whole content to your other pc/server containing the new drive by using the secure copy command:
scp * -r <IP-address>:/var/www/

Note: <IP-address> is the External IP-address of your destination.
Forward this external IP-address for port 22 (SSH) to the internal IP-address of your machine containing the new drive.
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005

Last edited by Hans; 7th September 2008 at 09:43.
Reply With Quote
  #3  
Old 26th July 2008, 01:11
awd.pt awd.pt is offline
Member
 
Join Date: Apr 2006
Location: Ericeira/Porugal
Posts: 57
Thanks: 9
Thanked 3 Times in 2 Posts
Send a message via MSN to awd.pt
Default

Hi,

I would tar the directory to somewhere with enouth space and the scp to my home server/disk and untar.

This way you would not loose the permissions/ownerships of the files/directories.

Assuming free space at ~root
tar pzcf ~root/www.tgz /var/www
scp ~root/www.tgz <myhomeuser>@<myhomeip>:
exit
cd <myhmeservernewdisk>
tar zxf ~<myhomeuser>/www.tgz

This way you'll only need, after, to unmount the disk and take it to the data centre.

Good luck.
Sérgio Rosa
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig install issues... flyingaggie Installation/Configuration 2 18th July 2008 10:46
add web site serr57 Installation/Configuration 18 13th April 2008 11:40
directories in /home/admispconfig/ispconfig renamed? Spudchat General 10 12th April 2007 19:37
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 17:17
Mysterious Install Problem tgansert Installation/Configuration 5 9th May 2006 15:35


All times are GMT +2. The time now is 22:05.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.