Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • sauritas 37 posts 57 karma points
    Aug 31, 2010 @ 17:09
    sauritas
    0

    Problems duplicationg umbraco installation and database

    Hi!

    First of all, I'm running:

    Umbraco v4.0.3

    Microsoft SQL Server 2005

    IIS v5.1

    I've been all day reading... but I still have problems...

    So... This is my case:

    I want to copy my umbraco installation and database (in computer 1) to another computer (computer 2). First I did these steps:

    1. Export DB from computer 1 to computer 2.

    2. Copy all the umbraco files from computer 1 to computer 2.

    Result: everything seems to be ok, but when I "publish" the site an exception occurs... looking around I realized that the problem was that there were no KEYS in the database.

     

    So I tried again and at last get the primary keys... but now when I run umbraco I don't get any content, members, users, templates and document types, but they are in the database.

    I look in database logs and get this error (this is one error...)

     

    <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {mso-style-noshow:yes; mso-style-priority:99; color:purple; mso-themecolor:followedhyperlink; text-decoration:underline; text-underline:single;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page WordSection1 {size:612.0pt 792.0pt; margin:70.85pt 3.0cm 70.85pt 3.0cm; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.WordSection1 {page:WordSection1;} -->

    At /umbraco/tree.aspx?rnd=306e3c5d-cda8-4ce5-898b-811a1e00baf1&id=-1&treeType=content&contextMenu=true&isDialog=false (Referred by: http://localhost/umbraco/TreeInit.aspx?app=content): System.ArgumentException: No node exists with id '-20'

       en umbraco.cms.businesslogic.CMSNode.setupNode() en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\CMSNode.cs:línea 159

       en umbraco.cms.businesslogic.CMSNode..ctor(Int32 Id) en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\CMSNode.cs:línea 91

       en umbraco.cms.businesslogic.RecycleBin..ctor(Guid nodeObjectType) en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\recycleBin.cs:línea 13

       en umbraco.cms.presentation.Trees.ContentRecycleBin.CreateRootNode(XmlTreeNode& rootNode) en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\Trees\ContentRecycleBin.cs:línea 58

       en umbraco.cms.presentation.Trees.BaseTree.CreateRootNode() en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\Trees\BaseTree.cs:línea 236

       en umbraco.cms.presentation.Trees.BaseTree.Initialize() en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\Trees\BaseTree.cs:línea 223

       en umbraco.cms.presentation.Trees.BaseTree.get_RootNode() en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\Trees\BaseTree.cs:línea 49

       en umbraco.loadContent.CreateRecycleBin() en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\Trees\loadContent.cs:línea 157

       en umbraco.loadContent.Render(XmlTree& Tree) en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\Trees\loadContent.cs:línea 170

       en umbraco.cms.presentation.tree.LoadTree(String treeAlias) en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\tree.aspx.cs:línea 87

       en umbraco.cms.presentation.tree.Page_Load(Object sender, EventArgs e) en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\tree.aspx.cs:línea 50

       en System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)

       en System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)

       en System.Web.UI.Control.OnLoad(EventArgs e)

       en umbraco.BasePages.BasePage.OnLoad(EventArgs e) en d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\businesslogic\BasePages\BasePage.cs:línea 287

       en System.Web.UI.Control.LoadRecursive()

       en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

     

    Any ideas?

     

    Thanks!!!

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 31, 2010 @ 17:21
    Ismail Mayat
    0

    When you do export did you do it through sql server manager? If so then I am certain it will not export data.  You need to either take a backup of database from computer 1 and restore to computer 2 or use sql publishing wizard that has option to spit out data as well.

    Regards

    Ismail

  • sauritas 37 posts 57 karma points
    Aug 31, 2010 @ 17:54
    sauritas
    0

    Hi!

    I did it though sql server manager.

     

    At last I did a backup, but there where problems... now they are solved.

     

    The problem was with umbracoUser in the database of computer 2. For some reason, when I did the backup, the database thought umbracoUser was the umbracoUser of the database in computer 1. We had to delete that umbracoUser and create a new one.... So now everything seems to be ok!!!!

    I think this steps are needed when I try to upload my site to a host, arent they?

     

    Thanks for the help Ismail!

  • Amir Khan 1287 posts 2744 karma points
    Aug 31, 2010 @ 19:54
    Amir Khan
    0

    From my experience, and I switch Umbraco sites around to my different machines pretty often, maintain dev sites and update, etc...The best way is to do it like this:

    1. Set up Umbraco on new hosting environment with fresh install (this makes sure you're not having any errors with configuration, db access, permissions, etc)
    2. Do a database backup from the existing Umbraco databse, generally it is helpful to overwrite the existing backup sets so you get a fresh .bak file with only the latest Umbraco info in it, especially if you're migrating to a shared hosting environment, sometimes they only upload the first backup in the backup set.
    3. Copy all of the files from the existing Umbraco server to the new one, minus the web.Config file in the root.

    Generally after following those steps I'm set, provided the machines are both configured in a similar fashion.

  • sauritas 37 posts 57 karma points
    Sep 01, 2010 @ 16:19
    sauritas
    0

    Hi!

     

    Thanks for your replies!

     

    We are still having problems... don't know why... so we are now trying to do a fresh install as Amir said. But, we have a problem... Computer 1 is using v4.0.3.... and we want computer 2 to have the same version... If we do a fresh install I guess it would be of the last version of Umbraco :(

  • Amir Khan 1287 posts 2744 karma points
    Sep 01, 2010 @ 20:18
    Amir Khan
    0

    You can get 4.0.4.2 here on the right side of the page: http://umbraco.codeplex.com/releases/view/51165

  • sauritas 37 posts 57 karma points
    Sep 01, 2010 @ 20:32
    sauritas
    0

    Thanks!!! But, what about version 4.0.3?

    Will I have problems using different version? Problably we aren't going to upload the site to a host until October, so I think there will be another version... what will happen if I instal the lastest version in my host and in my localhost I have an older version? I think now is better have all in 4.0.3....

  • Amir Khan 1287 posts 2744 karma points
    Sep 01, 2010 @ 21:10
    Amir Khan
    0

    You should be fine using 4.0.4.2, you could probably use 4.5 as well and just set UseLegacyXmlSchema to true in the UmbracoSettings.config file, this of course depends on what packages you're using. I'm building 2 sites with 4.5 right now using the legacy schema and all of the packages / macros I generally use are working great including:

    • Multiple File Upload
    • LoopImagesinMediaFolder
    • Cogworks Flexible Navigation
    • Gecko Uploadify
    • InsertFlashFile (modified from Dandrayne's package)
    • Desktop Media Uploader

    This document might help: http://our.umbraco.org/wiki/reference/packaging/umbraco-45-compatibility

  • sauritas 37 posts 57 karma points
    Sep 01, 2010 @ 21:13
    sauritas
    0

    We will try with umbraco 4.5 tomorrow at work... in computer 2 (the one I need the new installation)... I'll tell you then!!!!

     

    Thanks!!!

  • sauritas 37 posts 57 karma points
    Sep 03, 2010 @ 12:36
    sauritas
    0

    At last we've got it run!!!

    These were the steps:

     

    1) Create a new database in computer 2 as said in the document ("Install umbraco 4 on Windows Vista.pdf") (Pag 15-19).

    2) Copy wwwroot directory in computer 2.

    3) Do a backup of the database of computer 1 . Restore it in computer 2.

    4) Delete the umbracoUser (or whatever user created in the first step). Create a new user related to the new database... Like in step 1... It's like doing two times the same thing (delete user an then create that user.... it was the only way we got it running).

    5) And that's all!!!!!

     

    Hope this helps.... I did a wiki page explainning the steps.... Follow the link below...

     

    http://our.umbraco.org/wiki/recommendations/recommended-reading-for-it-admins/copy-an-umbraco-installation-and-db-in-another-computer

     

     

    Thanks Amir and Ismail!

Please Sign in or register to post replies

Write your reply to:

Draft