DNN clone
Last Post 06/21/2013 3:29 PM by Joseph Craig. 5 Replies.
Author Messages Resolved
Kyle D
Nuke Newbie
Nuke Newbie
Posts:7


--
06/17/2013 3:01 PM
    Our web server was just cloned so that we can have a staging environment. What steps do I need to take so that the database on the production server is not written to?

    Here is what I am thinking - modify the connection strings in web.config on the clone so it references Database_test instead of Database and then rename Database to Database_test. Is this all I need to do to be 100% safe from overwriting the live server? I am particularly nervous because the 1st thing I intend to do with the staging environment is upgrade DNN CE 5.6.2 to the current version 7.

    Your feedback is welcome and very much appreciated.
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    06/17/2013 9:44 PM
    When you say "clone" do you mean copied to a second server, or copied on the same server?

    Your description is close to correct.

    You'll want to have duplicates of the database, the web directory, and you'll want to set up a separate website. The cloned website should have a different URL than the original.

    If the two databases are on separate SQL Servers, there's no problem. If they are both in the same SQL Server, you'll certainly want to have different names.

    The web.config file for the cloned site should be edited to point to the cloned database.

    In the database, you will want to edit the PortalAlias table to remove the portal aliases for the original site, and you should replace them by appropriate URLs for the new site. You'll also want to look at the PortalSettings table and remove or change references to the the orginal site as the default portal alias, and replace with a reference to the cloned site.

    I think that's it. If you run into problems redirecting to the original site, the problems will be in the Portal Alias or the Portal Settings table.

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    Kyle D
    Nuke Newbie
    Nuke Newbie
    Posts:7


    --
    06/18/2013 12:27 PM
    Thanks for the feedback Joseph. Yes, the live site was cloned to a separate server and has its own unique URL. On the clone, I edited web.config to point to the clone database but didn't change the database name (no need to). I edited only one line under connection strings:



    became



    dbo.ABC_DB_PortalAlias - Only two entries are now; localhost and External IP
    dbo.ABC_DB_PortalSettings - DefaultPortalAlias entry ahs SettingValue of NULL

    After all of this, I did a test by editing something in the HTML module of a page on the clone site. The changes were not reflected in the live site. That's what I want. Before I run the DNN 7 upgrade on the clone, is there anything else I can do to make things foolproof? Or should I just backup the live site directory and database so I'm covered no matter what? In that case, I need a pointer on how to backup the database without taking it offline. The only way I can copy the database in windows explorer is if I STOP the SQL Server, which will make the website dysfunctional while I copy.
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    06/19/2013 2:09 PM
    There are two connections strings in web.config, so you should have edited both.

    Use SQL Server Management Studio to make a backup of your database.

    I just ZIP the web directory to back that up.

    To upgrade:
    1. Backup the database
    2. Backup the web directory
    3. Extract the Upgrade package into the web directory (after UNBLOCKING it)
    4. Browse to the site and follow directions.

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    Kyle D
    Nuke Newbie
    Nuke Newbie
    Posts:7


    --
    06/20/2013 4:59 PM
    Well, the basis of this question was separating the two databases, and your advice led to success. Thank you. As for the upgrade, I unzipped to the web directory and then when I tried to launch the site I am seeing error after error about the web.config file and some asp.net problems too. Version 5.6 to 7 is probably a quantum leap, but I even retried it going 5.6 to 6 and it doesn't seem any better. Once I get motivated again I'll launch a new topic. Thanks again.
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    06/21/2013 3:29 PM
    Kyle,

    You will find a "Suggested Upgrade Path" in the DotNetNuke Wiki at DotNetNuke.com.

    Joe Craig, Patapsco Research Group
    Complete DNN Support


    ---