Copied to clipboard

Flag this post as spam?

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


  • skaue 43 posts 44 karma points
    Sep 04, 2009 @ 12:26
    skaue
    0

    How to duplicate an Umbraco installation

    I have a working Umbraco installation I want to duplicate to save me some configuration time.

     

    My plan is to do the following:

    1) Create a new database and import all data from source to this database

    2) Create a new website and copy all files from source to this website

    3) Modify web.config to point at new database created in step 1

    Before I do something stupid; does this sound like a brilliant plan?

    Thanks for reading! :-)

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 04, 2009 @ 12:35
    Dirk De Grave
    0

    Hi skaue,

    Sounds like a plan, and it's what I do most of the times when switching from dev -> staging -> live. I'd just recommend to do a backup/restore of the database, otherwise, you might run into incompatible id's (for content nodes)

    Afterwards, publish all top level nodes and additionally, republish entire site to refresh the cache -> those steps are not mandatory, but I tend to do it for every move.

     

    Cheers,

    /Dirk

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 04, 2009 @ 12:37
    Dirk De Grave
    0

    You could still do the import of data, but I'd remove the identity seed on the target tables (haven't done it before, and don't know what impact if would have if you switch it back on)

     

    /Dirk

  • skaue 43 posts 44 karma points
    Sep 04, 2009 @ 13:05
    skaue
    0

    Hmmm.. what does "incompatible id's" mean? And what is "identity seed" and "target tables"? And should I at all be any concerned given your reply "it's what I do most of the time"... ;-)

    Sounds to me like I can do this just as I plan, and it will work like charm.

  • Richard Soeteman 4036 posts 12863 karma points MVP
    Sep 04, 2009 @ 14:19
    Richard Soeteman
    0

    Why not just Backup and Restore the database and then follow the step 2 and 3 that you mentioned?

    Cheers,

    Richard

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 04, 2009 @ 14:26
    Dirk De Grave
    0

    @richard: that's exactly what i've suggested as well!

    @skaue: each record you'll be importing in the target db will get a unique node id, not necessarily identical to the source record, which may cause pages to break (if you create links to other pages from the rte for example), that's what I mean with incompatible id's (identity seed is a sql server term / target table is the table on the target db, the database you're going to move the data to)

     

    Oh, and btw, umbraco has some nice products for this job, it's called Courier!

    Cheers,

    /Dirk

     

  • Richard Soeteman 4036 posts 12863 karma points MVP
    Sep 04, 2009 @ 14:47
    Richard Soeteman
    0

    @ Dirk, sorry, I really need weekend :-(

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 04, 2009 @ 15:24
    Dirk De Grave
    0

    No worries Richard, now skaue will have to follow our advice as we both have been suggesting the same?

     

    /dirk

  • skaue 43 posts 44 karma points
    Sep 04, 2009 @ 17:18
    skaue
    0

    hehehehe..... As long as you both agree. I might consider running a backup/restore instead of import. 

    I didn't know about the ID issue, but I've been testing the site and everything seems to work... even links created in rte

  • skaue 43 posts 44 karma points
    Sep 09, 2009 @ 09:41
    skaue
    0

    Hmm... I'm getting an SQL error when trying to publish changes, and was wondering if it may have something to do with my export/import-approach

    Cannot insert the value NULL into column 'id', table 'axdata_cms_dk.dbo.cmsPropertyData'; column does not allow nulls. INSERT fails.
    The statement has been terminated.

  • skaue 43 posts 44 karma points
    Sep 09, 2009 @ 09:46
    skaue
    0

    oh, and running sql express, without any profiler tool ofc, how do I debug sql's in umbraco?

  • Tommy Poulsen 514 posts 708 karma points
    Sep 09, 2009 @ 09:55
    Tommy Poulsen
    0

    Apparently your id-field in the db does not have the "identity" property set to true - open the table in your Visual Web Developer Express (or whatever you use to view db), and set the id-property called Identity to true.

    >Tommy

     

  • skaue 43 posts 44 karma points
    Sep 09, 2009 @ 10:00
    skaue
    0

    Thanks!! You are right, and this is why export/import DOES NOT WORK... I will do a backup/restore instead....

     

  • Tommy Poulsen 514 posts 708 karma points
    Sep 09, 2009 @ 10:06
    Tommy Poulsen
    0

    If you use the Database Publishing wizard available from e.g. Visual Web Developer Express you will get identity properties etc. also.

    >Tommy

     

  • skaue 43 posts 44 karma points
    Sep 09, 2009 @ 10:10
    skaue
    0

    My problem is that I have an already running umbraco on a webhotel, and with limited access to the sql server I cannot create a backup (no access to filesystem on server). I want to move the umbraco site to a new server where I have full RDP access, though only SQL Server Express.

  • Tommy Poulsen 514 posts 708 karma points
    Sep 09, 2009 @ 10:11
    Tommy Poulsen
    0

    Sure, but the publishing wizard will give you a large sql file containing everything - and you can execute that on your hosted db.

  • SiKo279 82 posts 238 karma points
    Sep 09, 2009 @ 14:31
    SiKo279
    0

    I used Sql Management Studio to script all the tables (drop/create included) including data.

    Running that on the the target server worked flawlessly already a couple of times. (= no issues with id's).

    YMMV

  • David W. 159 posts 284 karma points c-trib
    Sep 10, 2009 @ 10:04
    David W.
    0

    Im planning to do the exact same thing as the original post describes.

    Just to be clear, I do not need to make a "blank" installation of umbraco on the server where I intend to copy to? Umbraco has never been used on that server, but copying my local files is enough to get Umbraco running?

    Thanks!

  • Richard Soeteman 4036 posts 12863 karma points MVP
    Sep 11, 2009 @ 06:18
    Richard Soeteman
    0

    @sledger,

    If you don't want to have a blank install (I assume you mean no following the install wizard)  you must restore the database that you used locally to develop the site on your server and then copy the local files

    Cheers,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft