Copied to clipboard

Flag this post as spam?

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


  • Jesper Ordrup 969 posts 1374 karma points MVP
    Sep 19, 2018 @ 07:20
    Jesper Ordrup
    0

    Clone Umbraco sql server to Sql Compact and back - any source?

    Hi all,

    Anyone having some source or know of a tool - or having any pointers for how to programmatically create a .sdf and fill it with data from a remote sql server - and back?


    Reason:

    We love to use Umbraco Cloud and we are already spoiled with the easy ways to set up projects locally.

    But ... sometimes it's not possible to use Cloud and then we have our own Gitlab/Runner setup for handling deploys. Typically this happens when a client has their own environments.

    /Jesper

  • Kevin Jump 1247 posts 7610 karma points MVP 2x c-trib
    Sep 19, 2018 @ 09:58
    Kevin Jump
    1

    Hi Jesper,

    There are a couple of options non-cloud to do this - uSync writes all config of the umbraco DB out to disk, and import it again at the other end, so you can have your umbraco config in source control, and push it out as part of your deployment.

    Your developers can then work on their own local copies of the DB and have all their changes checked in to source control - and your server have the changes reflected in its DB when its deployed too.

    uSync will do most of this automatically, saving when devs make changes and applying those changes when you deploy and the site starts up, and there is lots of config to control exactly what is exported / import and when it happens.

    You might also want to look at chauffeur which provides a command line into umbraco, so you can potentially run things as part of your CI/CD pipeline before the site starts up (there is also a uSync Chauffeur package, so you can combine the two)

    some of the config of all this depends on your deployment tools, but lots of people have deployments working on this VSTS/Azure or Octopus Deploy, so i am sure people can give you specific pointers if you need them.

  • Jesper Ordrup 969 posts 1374 karma points MVP
    Sep 19, 2018 @ 10:20
    Jesper Ordrup
    0

    h5yr Kevin,

    Thanks for your reply. You and your uSync package - rocks!!

    We are already heavy users of uSync (addicts actually). It's great for syncing content, templates, dics, doctypes etc.

    But I don't think that I can create a complete clone of an Umbraco database running remotely on SQL server to a local SQL Compact database with it?

    Best

    Jesper

  • Kevin Jump 1247 posts 7610 karma points MVP 2x c-trib
    Sep 19, 2018 @ 13:23
    Kevin Jump
    0

    No it doesn't clone (but then again Umbraco Cloud isn't really doing that either, its doing similar steps to below)

    What you want to do is seed a empty SQLCE Database (chauffeur can do this from the command line - or you can do a blank install umbraco install).

    and then have uSync (or again a chauffeur command line) populate the data from the files.

    then your site will be a 'clone' but running on SQLCE.

    Kevin

  • Jesper Ordrup 969 posts 1374 karma points MVP
    Sep 19, 2018 @ 13:35
    Jesper Ordrup
    0

    Hi Kevin,

    Thanks. I'll look into Chauffeur and try it out.

    thanks again

    Jesper

Please Sign in or register to post replies

Write your reply to:

Draft