Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th March 2011, 09:53
happz happz is offline
Senior Member
 
Join Date: Feb 2008
Location: Nashville, TN
Posts: 261
Thanks: 35
Thanked 6 Times in 5 Posts
Default restoring website from one server to another

This is a first time for me on restoring a website to another server-

I back up my website's using the backup feature on ispconfig3. I decided to take the old server down and bring a new one up.

I copied the web.1.zip file to my pc and then logged into winscp as root and copied the zip file over. I then logged into putty and unzipped.

After I found most all my files being owned by root when before it was web1 as owner.

Where am I going wrong?

happz
Reply With Quote
Sponsored Links
  #2  
Old 26th March 2011, 13:09
ChadNomad ChadNomad is offline
Junior Member
 
Join Date: Feb 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think that you are probably logged in as root which is why the files are given that permissions.

You use the commands chown (change owner) and chgrp (change group) to change the user and group.

example of recursive is something like;

Code:
chown -R web1 /the/path/*
chgrp -R <groupname> /the/path/*
Reply With Quote
  #3  
Old 26th March 2011, 17:11
happz happz is offline
Senior Member
 
Join Date: Feb 2008
Location: Nashville, TN
Posts: 261
Thanks: 35
Thanked 6 Times in 5 Posts
Default

Thanks. Is there a specific how to you know of? Like in steps on how to add back the zipped folder to another location?

Thanks,
happz
Reply With Quote
  #4  
Old 27th March 2011, 20:12
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Unzip the file on your PC and then upload them to the web site with FTP (make sure you use the correct FTP user). That way the files are automatically owned by the FTP user.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 28th March 2011, 04:00
happz happz is offline
Senior Member
 
Join Date: Feb 2008
Location: Nashville, TN
Posts: 261
Thanks: 35
Thanked 6 Times in 5 Posts
Default

Let me ask you this question.

What i have is- srv1 running wwwdotgodaddydotcom and it is web.4zip

So I decided to shut down srv1 because it is getting old and I just bought a new server (srv2)

On srv2 I decided to not add back all of my website and only one website wwwdoegodaddydotcom but now it is my first and only website on srv2 which also has a different ftp user as well.

How can I download web.4.zip from srv1 and then unzip it and upload to the new server when it is a different ftp server now? Plus, the website has many permissions set i.e. /application/public which is all 777 yet, /application/non-public is 755 and in other places I have file rights set throughout. How in this situation can I get permissions back down to the original file rights and with the same ftp user?

happz
Reply With Quote
  #6  
Old 28th March 2011, 14:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

You can make a .tar.gz of the web site like this:
Code:
tar -pczf backup.tar.gz /path/to/web/site
This will keep all permissions and ownerships. You can then transfer the .tar.gz to the new server with scp...
Code:
scp backup.tar.gz root@srv2:/path/to/directory
(replace srv2 with the full hostname or IP of server2)

... and there you can uncompress it like this:
Code:
tar xvfz backup.tar.gz
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
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
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Centos5.4/ISPConfig 3--Virtual site not working MichaelCaditz Installation/Configuration 25 25th March 2011 11:37
Not working emails (DNS and postfix problem?) shekiman Installation/Configuration 9 1st March 2011 16:25
Email problem 'Cannot set my user or group id.' (using ISPConfig 3 + OpenSuSE 11.2) urosm Installation/Configuration 5 19th June 2010 22:41
Connection dropped by IMAP server gublym Server Operation 5 23rd January 2009 09:47


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


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