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?
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.
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.
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.
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!
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?
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
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
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
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.
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.
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
is working on a reply...