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/
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:
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.
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>:
tar zxf ~<myhomeuser>/www.tgz
This way you'll only need, after, to unmount the disk and take it to the data centre.
|All times are GMT +2. The time now is 00:07.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.