Instantiate a Kentico Instance from a old database backup

Jaspal Marok asked on August 17, 2018 14:41

How can I instantiate a new kentico instance from a database backup, Trying to create a dev environment for changes of a currently running site. I have tried using the Import/ Export from the sites application but I keep getting code name format error with that approach. I have read the documentation for the import toolkit but I think I am looking at the wrong place.

Correct Answer

Brenden Kehren answered on August 17, 2018 17:48

Simple solution assuming you only have the database.

  • Restore your database to a server or local SQL Server instance.
  • Using the Kentico Installation Manager (KIM) tool, install a new instance of Kentico with the major same version as your database. Be sure to NOT attach it to an IIS instance OR install a database.
  • After installing the new instance of Kentico, use KIM to hotfix (ONLY the code) to the same version as the database.
  • Update the connection string to point to your restored database.

If you don't have the KIM installer, you can log into your Client Portal and download it. This method will NOT introduce any license issues and NOT require you to install any new database or database objects.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Arun Kumar answered on August 17, 2018 14:47

Hi,

You can download new Kentico instance and then just change the database connection string in web.config file with your database backup to get all the content. You might get license issues at first but you can solve them by adding required licenses for your dev environment in this new Kentico instance.

0 votesVote for this answer Mark as a Correct answer

Jaspal Marok answered on August 17, 2018 15:20

Arun, Should I install the new kentico instance with a database from the installation wizard or without a database. Thanks

0 votesVote for this answer Mark as a Correct answer

Arun Kumar answered on August 17, 2018 15:21

You can install it with database and then switch the DB later on.

0 votesVote for this answer Mark as a Correct answer

Jaspal Marok answered on August 17, 2018 16:06

Did It but receiving error Invalid website, also the /Admin is unreachable too. Reverting to intial database works fine though

0 votesVote for this answer Mark as a Correct answer

Arun Kumar answered on August 17, 2018 16:38

As I mentioned earlier, there will be licensing issues, you have to change the license for the default site. You should see a link to Sites in Invalid Website error page. Click on that, it will take you to the Sites page and there you can change the Site Domain according to available licenses you have.

0 votesVote for this answer Mark as a Correct answer

Jaspal Marok answered on August 17, 2018 16:44

Already Tried that arun the admin area is unavialable and returns 404 once the db changes so there is no way for me to change the license from there, Have you experienced anything similar to this ?

0 votesVote for this answer Mark as a Correct answer

Arun Kumar answered on August 17, 2018 16:51

Backup Database which you are using is Kentico database? Are you running the site from IIS or from Visual Studio? I have experienced the same but I was able to login to admin panel easily.

0 votesVote for this answer Mark as a Correct answer

Jaspal Marok answered on August 17, 2018 16:59

The Database is Kentico Database and is running on a IIS Server, I am quite sure I am on the same version and hotfix as the other Instance where I got the database from.

0 votesVote for this answer Mark as a Correct answer

Arun Kumar answered on August 17, 2018 17:32

Have you tried to open it directly from Visual Studio?

0 votesVote for this answer Mark as a Correct answer

Jaspal Marok answered on August 20, 2018 05:20

I guess both the answers were working but the final issue was with the binding configuration for IIS configuration which required a https binding. Finally, I was able to login after a query to change the administrator password. But now after import all the custom web parts are returning errors on all the pages this might have to do something with the source files not being present. How may I proceed ?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 20, 2018 05:44

If you don't have the source code then you're in trouble with those webparts. Unfortunately you need those to resolve the errors.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.