Here is how I would do it. First I would take a backup of the database from your local machine, when you have done this. I would install the database backup at the staging environment.
After you have installed the database on your staging environment, then deploy the code to the staging environment. I recommend that you leave out the /App_Data/TEMP folder as well when doing your deploy. As the name implies it contains temporary files, which you don't want to copy up on your staging site.
Furthermore you donĀ“t need to copy over the /App_Data/Logs folder either. No need to have your local logs on your staging server.
Also be aware of maintaining a local web.config and a staging web.config because you are using another connection string to point to the database on your staging environment.
And if you have an ongoing process where you are developing new features, when you have some different options to maintaine your environments so the is up to date all time. One approach could every time you create a new document type on your local machine, you do the same for all your environments.
Import the nwe document types via a package into Umbraco backoffice could be another a approach. There is some package that can help you keepconsistency on document types, tempates and so on. Try to have a look at the package called Umport developed by Kenn Jacobsen http://our.umbraco.org/projects/developer-tools/umport
Thank you for your reply,
That's how I normally deploy, deploy all folder except app_data, controller, Model, etc.
and restore the database to the other environment.
But in this case, I have already uploaded over 2000 images and when i deploy to staging, i wanted to start fresh database.
So i was wondering if there's anyway of having a fresh database, and i just import the document types into the newly created database.
You could try to have a look at the package called Umport developed by Kenn Jacobsen http://our.umbraco.org/projects/developer-tools/umport With this package you can import and export document types, and templates and so on.
Umbraco 7.2.1 creating clean set of Database
Hi guys,
I have developed an Umbraco website on my local machine and now i would like to deploy this to our staging environment with clean database.
I have deployed the code, created empty database. What i was expecting was go through the initial Umbraco setup process. But it didn't go there.
I was planning to get clean set of database and import all the document types via Umbraco backoffice.
What would be the best way of deploy a site with clean set of database?
Thank you
Shinsuke
Hi Shinsuke,
Here is how I would do it. First I would take a backup of the database from your local machine, when you have done this. I would install the database backup at the staging environment.
After you have installed the database on your staging environment, then deploy the code to the staging environment. I recommend that you leave out the /App_Data/TEMP folder as well when doing your deploy. As the name implies it contains temporary files, which you don't want to copy up on your staging site.
Furthermore you donĀ“t need to copy over the /App_Data/Logs folder either. No need to have your local logs on your staging server.
Also be aware of maintaining a local web.config and a staging web.config because you are using another connection string to point to the database on your staging environment.
Hope this helps,
/Dennis
Hi agian,
And if you have an ongoing process where you are developing new features, when you have some different options to maintaine your environments so the is up to date all time. One approach could every time you create a new document type on your local machine, you do the same for all your environments.
Import the nwe document types via a package into Umbraco backoffice could be another a approach. There is some package that can help you keep consistency on document types, tempates and so on. Try to have a look at the package called Umport developed by Kenn Jacobsen http://our.umbraco.org/projects/developer-tools/umport
Another alternative is of course the Courier package develped by the Umbraco HQ, with this package you can also transfer content between your different environments. http://our.umbraco.org/projects/umbraco-pro/umbraco-courier-2 and a blog post about Courier for Umbraco 7 https://umbraco.com/follow-us/blog-archive/2015/1/9/courier-for-umbraco-72
Hope this helps,
/Dennis
Hi Dennis,
Thank you for your reply, That's how I normally deploy, deploy all folder except app_data, controller, Model, etc. and restore the database to the other environment.
But in this case, I have already uploaded over 2000 images and when i deploy to staging, i wanted to start fresh database.
So i was wondering if there's anyway of having a fresh database, and i just import the document types into the newly created database.
Shinsuke
Okay, try to see my post above.
You could try to have a look at the package called Umport developed by Kenn Jacobsen http://our.umbraco.org/projects/developer-tools/umport With this package you can import and export document types, and templates and so on.
Another alternative to the Uimport is of course the Courier package develped by the Umbraco HQ, with this package you can also transfer content between your different environments. http://our.umbraco.org/projects/umbraco-pro/umbraco-courier-2 and a blog post about Courier for Umbraco 7 https://umbraco.com/follow-us/blog-archive/2015/1/9/courier-for-umbraco-72
Perhaps this could be a solution for you.
/Dennis
is working on a reply...