Mitchel's Forums

Subject: How to make a local copy of a hosted site
Prev Next
You are not authorized to post a reply.

AuthorMessages
CabinMommaUser is Offline
New Poster
New Poster
Posts:5

08/08/2008 1:47 AM  

I have a 'live' site and a 'test' site in a hosted environment.  These are both on 04.08.01 and I would like to update these to 04.08.04, but first I would like to make a local copy of live site, where I hope to test the update (followed by updates of the some modules).  If this goes well, I will update my test site and then, finally my live site.  I made the test site (which I copied from my live site) in order to have a place to test these things, but I have 2 reasons for wanting a local copy: we are about to embark on some major changes to one of our primary modules and I'd like a "play" area, if you will, so that I can test things before my partners see it in the test site, as well being able to work off-line sometimes. and I'd like one more place to try the dnn update before attempting in our live site, (since I'm so new and very inexperienced, I'd really like more than one test-run at the update to verify I won't have any issues with our live site).

Ok, having given more background than was probably necessary, if anyone's still reading, here's my a description of my current situation:

My local machine is Vista with SQL Server Express. 

I set up a new installation of DNN 04.08.00 locally (took quite some time to figure out how to make it connect to a specific, non-attached, database in sql server express).  That installation appeared to work correctly (could log in as host, etc). Then, I did the following:

I copied over this directory with my backed up files from my test site.
I restored a backup of my test site db to my new db on sql server express.
I changed the Portal Alias.
I changed the web.config file connection information (copied from a backup of the web.config of my new 04.08.00 local installation)

When I try to access this new local site now, I get the following error:

DotNetNuke Error: - Version 04.08.01


Invalid URI: The hostname could not be parsed.

 

(at which point, I realized that my live & test were 04.08.01... When I had originally asked for a DNN installation on my test site, my hosting company installed 04.08.00 to my test site - most current at that time... after we worked the kinks out of our site, we were ready to go to live. I asked for my hosting company to install the latest DNN to our live stie - same request as before, but in the month and a half we took putting things together, 04.08.01 had come out, so that's we go there.  Some time later, I copied live to test, with no issues... never thought to check the dnn versions at that point, so I thought I was still on 04.08.00)

 Now, I'm not sure where to go with this.

If anyone has any ideas (including completely starting over on my local machine...), I would be so appreciative. 

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5595

08/10/2008 6:40 PM  
If your database restore was successful, it doesn't really matter what you used for the first install on your machine to get it right.

Are you using IIS on a port other than 80 on your local machine?

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
CabinMommaUser is Offline
New Poster
New Poster
Posts:5

08/10/2008 11:20 PM  
I'm using IIS on port 80. After nosing around some other forums, I checked to see if I could navigate to loalhost/mysite/logo.gif - which I could. Based on that (and the advice I was reading), I did a 'reset' on IIS (at the command prompt). After which, I no longer received the above error, but instead got an error (which I don't have handy at the moment) that said something to the effect that it could not resolve localhost:80/mysite, with a line about "physical address: c:\inetpub\wwwroot\mysite - whcih is not where my site was physically located (it was, in fact, at c:\dotnetnuke\mysite).

After trying several things (including checking within IIS for the settings for 'mysite', which had the correct physical location). I finally just copied the directory into inetpup\wwwroot, updated the settings in IIS to have the physical path point to the directory in inetpub\wwwroot. Now it works. However, that feels like treating the symptom not the problem... I think I lack a basic understanding of IIS that is causing the problem. I thought that by adding a new application and putting in the physical path was enough (and, what is confusing is that it was enough for the fresh install of dnn... but not, apparently after I copied my files in and changed the web.config).

I'd still like to understand what I did wrong, but I've been able to repeat making my copy into a new directory in inetpub\wwwroot (used the same files from my site and the same db backup to restore to a new db).... so I essentially have what I need for my current tasks - a place to test the dnn upgrade followup by tests of my module updates - but I still feel uneasy that I don't understand something ocmpletely that I was not able to put my site physically where I know I should be able to.

I also don't know a good work around for the fact that images do not display correctly in the copied site (now that the images directory is now /mysite/images instead of /images, as it is on my live site. I would truly like to use this as a development area of sorts (not real development in the proper sense of the word, but as a place for me to work offline on site updates, via the DNN interface). I've seen your tool for taking a local site up to a root-level live site, but logically, I can't think of a way to really do the reverse.

Thank you very much for your response, but I think I'm going to test the dnn update with this copy and after I'm up on 04.08.04 and have my module updates done, I'll revisite this again.

I alsowant to thank you so much for all your guides in your blogs, they have been invaluable resouces for me as I continue on my learning path for DNN.
Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5595

08/13/2008 8:17 PM  
My guess on the path issue is that it is related to the "HomeDirectory" setting within IIS, being set to the default inetpub location.

As for the images, sadly there is not really a good way around this, other than to restore DNN to the ROOT of your IIS instance, which when testing this site for upgrades is EXACTLY what I do....as I am a bit cautious to ensure that I don't loose anything.

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
mkizerUser is Offline
New Poster
New Poster
Posts:7

09/22/2008 1:23 PM  

Posted By Mitchel Sellers on 08/13/2008 8:17 PM
...other than to restore DNN to the ROOT of your IIS instance, which when testing this site for upgrades is EXACTLY what I do....as I am a bit cautious to ensure that I don't loose anything.

Hi Mitchel, can you expand on this statement a bit?

I've just recently backed up my remote hosted site and restored it to my local PC for testing an upgrade. I can get everything working with no real issues, at least on my main portal. This site has a few other parent portals (like your site I suppose). How do you test those other sites as well?

 


~Michael Kizer.com
Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5595

09/22/2008 4:06 PM  
Michael,

If you restored it locally to just http://localhost and got the main portal working, for other parent portals you will need to edit your hosts file to define other aliases.

You can add other entries in the same format as the localhost entry then just make sure you have a proper alias setup.

The hosts file I believe is in C:\Windows\System32\Drivers\Etc. It is text file with no extension.

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
mkizerUser is Offline
New Poster
New Poster
Posts:7

09/22/2008 4:50 PM  

OK, thanks...I'll give that a shot.

I had restored my site to a subdirectory under wwwroot, but I'll move it up to wwwroot and see if I can get the alias and hosts entries lined up.

 


~Michael Kizer.com
mkizerUser is Offline
New Poster
New Poster
Posts:7

09/22/2008 5:26 PM  

Wow, that works great! It's such a simple solution too.

So, now in addition to my regular portal aliases (domain1.com, www.domain1.com, domain2.com,etc.), I've added: domain1.local, domain2.local

Added some references in my HOSTS file:

127.0.0.1        domain1.local

127.0.0.1        domain2.local

and fired up the browser... go to the .local address to get the "local" version of the .com

The .local bit helps me make sure that I'm not really trouncing all over the actual site. I suppose you could even change the header on the test site (or the skin color -- something that stands out from the real site)...just to keep you from getting yourself in trouble. <img src=" border=0>

Thanks, Mitchel


~Michael Kizer.com
Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5595

09/22/2008 5:36 PM  
I'm glad that you got it working!

Once you understand how it works, it is actually quite simple and can really save the day when you need to do some testing!

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
mkizerUser is Offline
New Poster
New Poster
Posts:7

09/26/2008 1:50 PM  

I decided to take your lead and write up a simple tutorial on this here:

Setting up a local test copy of your hosted DNN site

Hopefully, it is easy enough to understand.


~Michael Kizer.com
Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5595

09/26/2008 2:13 PM  
Great writeup!

Writing something like this has been on my to-do list for about a year now! I'm glad that someone has gotten the chance to do it!

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
mkizerUser is Offline
New Poster
New Poster
Posts:7

09/26/2008 2:24 PM  

The good news: I actually checked something off of a ToDo list!

The bad news: It wasn't my ToDo list!

Oh well, at least I didn't add 10 more things to my list today (yet)...

Feel free to link to that article from your site (it has some link backs to your articles in it).


~Michael Kizer.com
Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5595

09/26/2008 10:25 PM  
haha! Hey, it works, and really from my perspective I'm just glad to see it documented, regardless of who does the documentation.

Putting this type of information out into the public domain just helps others adopt DNN which helps the eco-system grow, and that is truly what it is all about!

I will most likely link out to your article here shortly, I also always appreciate the links from your articles as well!

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
You are not authorized to post a reply.
Forums >Development Discussion >DotNetNuke > How to make a local copy of a hosted site



ActiveForums 3.7