Copied to clipboard

Flag this post as spam?

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


  • Simon Ziegler 10 posts 81 karma points
    Mar 13, 2017 @ 10:37
    Simon Ziegler
    0

    Umbraco.sdf and source code control

    I use TFS to keep my source code secure off site. Umbraco.sdf is not added to TFS however and I cannot add it. This is worrying as the database is central to what I want to keep safe for the long term! Has anybody else dealt with and resolved this issue?

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Mar 13, 2017 @ 11:02
    Dave Woestenborghs
    0

    Hi Simon,

    I would not put the database in source control. If you work with multiple developers this is not even possible. Because changes made by developer x will be overwritten when developer Y commits his database.

    We use sql server with Umbraco and back that up.

    Dave

  • Simon Ziegler 10 posts 81 karma points
    Mar 14, 2017 @ 08:48
    Simon Ziegler
    0

    Thanks Dave,

    I am working solo with my websites and will do so for the foreseeable future (probably forever). I do not want to spend on SQL Server, but will migrate if other developers do come on board (highly unlikely as these are more personal projects) - that would probably be their first task.

    So I do still need to keep Umbraco.sdf in source code control to avoid risk of catastrophic data loss.

    Simon

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Mar 14, 2017 @ 08:52
    Dave Woestenborghs
    0

    Hi Simon,

    I just checked and I can put the sdf file in git repo.

    Maybe it's a tfs setting on your site that doesn't allow sdf files to be comitted ?

    Dave

  • Richard Eyres 98 posts 580 karma points
    Mar 14, 2017 @ 08:59
    Richard Eyres
    0

    I use the SDF files with tiny projects, and can store them in GIT. (i do not have access to TFS). There is a SQL backup project - https://our.umbraco.org/projects/developer-tools/sql-backup/

    This backs up the database to a backup file, which i would hope you could then save.

    Another option would be to get some secure cloud storage, and upload the file there.

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Mar 14, 2017 @ 09:05
    Kevin Jump
    0

    Hi

    take a look at the uSync package*

    uSync saves the database elements of usync out to disk (as xml) that you can then source control. It also imports them back from disk into the database - so you can check those changes back out and other developers can pick up your site from the source code repo (if needed).

    That way you don't need to source control the sdf file, and you can track changes between things like doctypes as part of your source control

    *disclaimier - i did write it - but lots of people use it and have done for a while now.

  • Simon Ziegler 10 posts 81 karma points
    Mar 15, 2017 @ 09:13
    Simon Ziegler
    0

    All,

    Many thanks for all the suggestions - my solution will be in amongst that lot. I just learned the hard way that putting Umbraco.sdf under TFS somehow corrupts it (I did have a backup!). I don't use Git only because I don't have time to learn yet another technology, no matter how well regarded.

    I think my solution is to do the XML backup, have that either under TFS or manuually backed up and to ditch the sdf file in favour of MySQL locally to an Azure Web App (the sites I have will never need to scale out, so local MySQL is just fine).

    If anybody has an opposing view, do let me know. And Dave, you were of course right from the outset!

    Simon

Please Sign in or register to post replies

Write your reply to:

Draft