locked
Restore production environment in test RRS feed

  • Question

  • Hi,

    I've got a production environment farm setup. I also got a testing / staging environment which is a completely seperate farm on a different server. When I want to test my software, I need to get the most recent back-up from the production environment and restore that into the test environment. I'm running into a problem trying to restore the data.

    When I try to restore from the back-up, it asks me if I want to keep the same configuration, or enter a new one. Since the databases have to be located on a completely different database server (the test server), I choose 'new configuration'. But when it tries to restore now, I get errors about the objects already existing. That's true, since there are older versions of the same site in the test environment already.

    I also found a powershell command to restore with overwrite, but that doesn't allow me to change the database server / configuration; so I'm not sure what that command is going to do with my databases.

    How do you guys cope with these back-up / restore things? How do you keep your environments in sync as much as possible?


    MCTS in Web Application Development in .NET 2.0
    Wednesday, January 19, 2011 11:37 AM

Answers

All replies

  • Hi

    Why dont you use Content Deployment for this?

    You can even configure it to run periodically so that you dont have to do it manually.

    http://blog.beckybertram.com/Lists/Posts/Post.aspx?ID=83

    Wednesday, January 19, 2011 12:11 PM
  • Hmm interesting! But in this case, the target server would be my development / staging area, right? Since I want the data from the production environment back into the staging environment. Or can this be setup both ways as well?
    MCTS in Web Application Development in .NET 2.0
    Wednesday, January 19, 2011 2:40 PM
  • Hey there, 

    WOW - What a solution!

    J, I'll be looking into this too - we have the same use-case as you, and the same need. Our production and test environments are separate, and we do need to keep them in sync. 

    And, if it's possible to go one way (from test to prod) using content deployment, why not the other? 

    Not sure if we'll have time to test this today, but when we do, I'll post an update of our status. Could you do the same, if you give it a try?

    Thanks!
    --Dave

    Wednesday, January 19, 2011 3:13 PM
  • It took me a while to get everything in sync, but I can now use these content deployment tasks to copy content from one site to the other. Works great! The only thing you need to do is get everyhing in sync. You need the same features installed, the same webparts, etc. etc. If one of the dependencies fails, the job won't succeed. But in my case that actually preferable, I now know for sure that my test environment is the same as my production environment as soon as the deployment job finishes.

    Thanks for the tip Naveed!


    MCTS in Web Application Development in .NET 2.0
    • Proposed as answer by akiraplt Wednesday, January 26, 2011 7:08 PM
    Wednesday, January 26, 2011 7:57 AM
  • Hey there, 

    Yep -- we're seeing the same behavior! Just for the record, we had TWO issues:

     

    (1) Our MaxAllowedSize in the web.config wasn't large enough to accommodate the large files that had to be sent from Production to Test. Standard web.config sizes were something like 10mb, while our transfers were something like 50+. Changing the settings for MaxAllowed made a difference. 

    (2) As you mentioned, EVERYTHING needs to be EXACTLY the same. We're working through this now, but once configured, it seems like we'll be able to clone environments back and forth.

    Thanks for the solution notes, J + Naveed! VERY HELPFUL!

    --Dave 

    Wednesday, January 26, 2011 7:08 PM