The Development Backup

  • Comments posted to this topic are about the item The Development Backup

  • For us the full DB build scripts are treated as code in the developers space and are thus under source countrol. This includes CSV files to bulk load static data.

    Replication, mirroring and other operational scripts live in the DBAs own branch of the SVN repository.

    To add a new dimension to this where does GitHub play in this space. We've had a few problems with internet connectivity that have caused a few headaches. Ditto cloud based wikis.

  • As a developer who doesn't want to lose my work as well as being the main DBA I make sure the development and test servers have the Ola Hallengren backup solution in place, backing up all user databases nightly, which ensures any new databases are backed up even if I don't know they have been created or I'm away.

    The TFS is on a seperate server similarly backed up.

    The Ola Hallengren solution is also great for Sharepoint database servers as that seems to add databases on the fly.

  • Ignoring David's valid point of availability of Internet based services in this arena (it is a good point but I have nothing to add so I am awaiting others' posts), I think that it is essential that the database is considered a first class citizen. ALL code should be under version control. Ideally, database generation should be part of Continuous Integration (CI) even if this is only based on a baseline database and update scripts.

    There is no excuse for turning down a generous offer of someone backing up the database. Even if that means relinquishing a little control. I guess that leads neatly to a point I haven't seen covered: developers and DBAs need to learn to play together. As Steve said in the editorial, sometimes there is an offer to manage a system which is the "manufacturing environment for software". One one side the developers should eagerly accept this generous offer. On the other side the DBAs need to understand that developers do need greater access to the box (compared to a production database server).

    We need to work smarter. That means that we need to work together.

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!

  • ... Do me a favor; put your database object code in source control. Add all your DDL for tables, views, functions, stored procedures, and anything else you use. ...

    We have our software application code in version control and we backup our production and development SQL servers daily. We don't have the SQL code in source control but I don't know how we would lose anything if a production or development server crashed as long as we have the backups.

    We also have our production and development servers running on VM's with snapshots and replication to an off-site co-location.

    If we find ourselves in a situations where we can't recover data, it's going to be an event so significant that work and data will be the last things on our minds. 😎

  • Do me a favor; put your database object code in source control. ...As long as it's on a different physical machine than the development server, you'll thank me one day. Just as long as you also run backups of that VCS database

    Oh come on Steve. What a waste of time and resources. The chances of losing both the server you develop on, and the VCS server at the same time are just...

    Um, hold on, wait a minute, we just lost power and all of our servers had disk crashes at the same time... I think I need to recover some servers, but no longer have back ups.

    🙂

    Dave

  • Dave62 (5/20/2014)


    ... Do me a favor; put your database object code in source control. Add all your DDL for tables, views, functions, stored procedures, and anything else you use. ...

    We have our software application code in version control and we backup our production and development SQL servers daily. We don't have the SQL code in source control but I don't know how we would lose anything if a production or development server crashed as long as we have the backups.

    We also have our production and development servers running on VM's with snapshots and replication to an off-site co-location.

    If we find ourselves in a situations where we can't recover data, it's going to be an event so significant that work and data will be the last things on our minds. 😎

    Don't source control and backups/replication have different goals? Yes, you can recover database code from a backup, but with database source control if someone makes a breaking change to a stored proc, you don't have to restore the entire database to roll back that stored proc.

    Leonard
    Madison, WI

  • I store all of my code outside the server. But I no longer use source control. We use Appasure for backups and it works remarkably like other source control products I've used. Very happy with it. The only gotcha I miss is documentation (barely). With source control products you could document what was happening outside of the code and that was occasionally nice. We've been using it for over a year and everyone is happy though the IT administrator has only recently become happy with Appasure (the bugs are pretty much gone).

  • Not surprising, coders have a love/hate relationship with databases. I liken it to developing a print in the darkroom (OK, pre-digital). The overall steps were easy, you could teach someone to develop a print in just a few minutes. But, it takes a longtime to understand the subtle details. As it is with databases, and database design. Insight, and not raw technical know-how is important.

    The more you are prepared, the less you need it.

  • djackson 22568 (5/20/2014)


    Do me a favor; put your database object code in source control. ...As long as it's on a different physical machine than the development server, you'll thank me one day. Just as long as you also run backups of that VCS database

    Oh come on Steve. What a waste of time and resources. The chances of losing both the server you develop on, and the VCS server at the same time are just...

    Um, hold on, wait a minute, we just lost power and all of our servers had disk crashes at the same time... I think I need to recover some servers, but no longer have back ups.

    🙂

    :). We had VCS and the dev database on the same server 20 years ago. A RAID crash was a bad day for us. Last backup was over a week old. We did a of re-factoring code from memory to catchup

  • I know of one shop that uses Red-Gate SQLCompare to create a snapshot of the production server every night and that gets checked into source control. It allows a dev environment to be refreshed from production in order to rehearse deployments.

    Having the CI servers rebuild from the last deployed baseline is a very useful thing to have.

    Having utility procs and test procs in source control is also handy. Whenever a new server is spun up the script to do so checks out the scripts to build the utility features and executes those scripts.

    Knowing that ever server has your most treasured utilities ready to hand is reassuring.

  • I have all my db code in version control. For some new projects, I have the database code in a visual studio project. From there, I can publish it directly to a database server. I can of course also do compares etc. The feeling of that is very nice.

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply