DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Backup and restore from Prod to test?

Sort:
You are not authorized to post a reply.





New Around Here





    Hi,

    I have tried to do a upgrade on a site from dnn 8 to dnn 9 by following a video. I did not realize (since the video did notexplain) that I needed a SQL backup. When I ran the update and finished, I ran into a lot of erros. Basically the site was broken. 

    The backup I originally did, was the file backup of the site on the server, (copy and paste) so I then recopied all the items back over to the orginal location. 

    The Site came back up but the admin/host dashboard did not come back up. All the options are missing. I can't even get to the login page of the stie. 

    Since this is a test website, I am not too worried. Is there a way to do a backup of the Production webiste and restore it to my test site? The test site is also missing a lot of content since the users were not keeping it updated. Figured I can hit two birds with one stone kind of scenario with doing a backup and a restore of the prodcution site. 

    I have access to the host server and the SQL db is on the same server. 

    Tried finding info on this but no luck. Anyone have a link or how to available? Anything is much apprecited. 






    Veteran Member





      OH, my ...

      Since you have access to the production site and it is working, you are ok.

      The bad news is that the test site most likely is toast unless you have a backup of the database. Is that server backed up regularly?

      There are plenty of guides to backing up and restoring a DNN site. I'd recommend https://mitchelsellers.co...nn-and-the-database. I haven't looked for a video, but look for Aderson Oliveira on YouTube or at DNNHero.com

      I'd also recommend learning a tiny bit more about DNN. A DNN installation includes the database and the file directory. You always need both!

      If you're going to be doing this a lot, you might want to invest in the DNN Backup and Restore module from Evotiva.com (and available also at store.dnnsoftware.com). The module is bulletproof, and can help eliminate errors when you try to move sites around.

      I hope that this helps. Feel free to ask for any other help you need.
      Joe Craig
      DNN MVP
      Patapsco Research Group





      New Around Here





        Thanks Joe. Good to know.

        I did end up finding a weekly backup of the server which was luckily done right before I did this change.

        I ran the restore to the test site on SQL using the .bak file and now I am getting the error of: "The service is unavailable" when I go to the testing site. I had also copied over the original files back to the original folder just to be safe.

        I was following the directions found here: https://mitchelsellers.co...on-from-backup-files
        but it seems a little dated. I am running on a 2014 SQL database and followed what I could but still not successful. I still feel like I am missing a step.









        Veteran Member





          Did you restore only the database? If so, I would also restore the file directory. Delete it and copy from your backup.

          The only other bit is IIS. Assuming that the database and files directory are restored, you'll want to make sure that the user that runs the App Pool is given full access to the root and lower level directories. And that the other bits (file directory, bindings, .net version, etc. are correct). Also, double check that the connection strings to the database work.

          Then, if things still aren't correct, try connecting from the server and you may get more of an error message. Check the log files in /portals/default/logs.

          And there probably are other things that I've forgotten.

          Put an index.html file into the root directory and see if that gets served.

          Change index.html to app_offline.htmand see if that gets served.
          Joe Craig
          DNN MVP
          Patapsco Research Group





          New Around Here





            Okay so I was able to get it resolved after a lot tries.

            These were the steps I took that worked for me.

            1. Stop ISS
            2. Restore the DB (luckily I had a backup of the DB) which was a typical restore as in any other SQL DB restore.
            3. Delete the entire contents in file directory folder for the site. <- I think this step was the crucial since I just kept copying over the existing data.
            4. Copy and paste into the file directory from an already copied folder (backup folder).
            5. Start IIS
            6. Recycle the pools
            7. Site is back up
            8. Back everything up again.

            Much appreciated Joe for the information and insight.

            Side questions,
            Is there anyway I can do a backup/restore from the production site to the now working test site? Sort of a clone (just different links)? The test site is missing a lot of info and pages. Or this is only done with purchasing the software as recommended?

            Also, is it recommended to upgrades version by version? Or should I skip a few version to run the upgrade on the site?
            Basically tried to go from version 8 to 9 but had failed results which created the problem in the first place.






            Veteran Member





              Yes, you can do this following the steps you listed. Substitute the db backup and the files backup for the backups from production and you'll be mostly there.

              The other key parts are the site alias and the db connection string.

              Before you backup the production site, add a portal (site) alias that matches what you'll be using on your dev site.

              After you restore the db from production to dev, make sure that the connection string (in web.config) is correct. You can simplify if you make sure that both sites are using the same connection string (db name, user, password).

              The reason for mentioning the Evotiva module (and Restore Pack) is that it gives you a UI to do all of this in addition so handling the backups and download. In other words, less chances to screw it up.
              Joe Craig
              DNN MVP
              Patapsco Research Group
              You are not authorized to post a reply.

              These Forums are dedicated to the discussion of DNN Platform.

              For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

              1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
              2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
              3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
              4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
              5. No Flaming or Trolling.
              6. No Profanity, Racism, or Prejudice.
              7. Site Moderators have the final word on approving / removing a thread or post or comment.
              8. English language posting only, please.

              Would you like to help us?

              Awesome! Simply post in the forums using the link below and we'll get you started.

              Get Involved