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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 24th July 2008, 18:23
malinens malinens is offline
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
Old 24th July 2008, 18:44
Hans Hans is offline
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,263
Thanks: 216
Thanked 649 Times in 295 Posts

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.

MrHostman | Managed Hosting

Last edited by Hans; 7th September 2008 at 10:43.
Reply With Quote
Old 26th July 2008, 02:11
awd.pt awd.pt is offline
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


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>:
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


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 11:46
add web site serr57 Installation/Configuration 18 13th April 2008 12:40
directories in /home/admispconfig/ispconfig renamed? Spudchat General 10 12th April 2007 20:37
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 18:17
Mysterious Install Problem tgansert Installation/Configuration 5 9th May 2006 16:35

All times are GMT +2. The time now is 20:26.

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