Deploy Umbraco website - database

I've been working with Umbraco to create my first website.
So far I almost completed the framework of my website and now I'm thinking about how to move it to my server. My idea is to upload my website when the framework is ready, and then create the contents remotely. I'm updating an existing website, which means that the host server already hosts one website, which I have to replace with the one I'm creating with Umbraco.
How can I do the deploy of the website?
Have to install Umbraco at the host server?
What about the Database?
I will use the database of the host server. I want to upload my new website, but still keep the old one in case something goes wrong. Please keep in mind that I'm a total newbie at this and have never uploaded any website. Would really appreciate your help!
Thanks in advance, have a great day!

Depending on the capabilities of your hosting provider. Create a new folder on the server and place there your Umbraco files.
And change the IIS webroot location to the new folder. (by changing it to the old location your old site is back again)
And you need to backup your local database, and restore on the database server from your hosting provider. and configure the connectionstring.
At low end hosting providers you can often not restore database backups.
one option may be to generate a SQL script including data. (often you need to change the database schema,user to the one you own on the hosting provider) Otherwise, start with a clean database and import your Umbraco items with a Umbraco package.

Related

How does database will be made available in case of container world

I am a new bee to the cloud and trying to understand few common issues which people solved already in the field.
As of now i have created a docker image for my java based web application. Also i have created a oracle database 11g XE instance with a database imported by default. Finally i pushed these docker images to the AWS repository and deployed to EC2 instances as a docker containers. I am able to access my web application using the public IP and everything is looking good except one thing. When the EC2 instance went down or recreated for some reason, the database container will be recreated with the original database, i will be losing all the data's which have been created after setting up my application for the first time.
I know this is a common issue in the container world, i just want to know how people solve this issue.

Building Deployment Azure With Database Migration Scripts

We are very new to Azure, we have a large existing website (multiple instances with different customers) with an associated windows service and SQL Server 2008 database.
We are in the process of migrating the website in development to Azure. We are creating an Azure worker role to wrap the code that the Windows service executes to run every hour but my main concern is deployment, in an ideal world we will automate the deployment but for now we want to get to the following point where we can build a single deployment package for a customer which runs the database migration scripts to the Azure SQL database and migrates the web role and site and during this time a holding page is displayed to let users know the site is currently being updated. Also it would be great if there was a way to rollback if something goes wrong.
Despite my research I cannot find the answer to the process above, everything seems to involve deploying the database changes (this will include custom scripts for data migration/changes) and then publishing the site to Azure from visual studio but as we want to deploy this multiple times it would be ideal to build a package that we run against each customer site/database when we/they are ready to migrate to the next version as this may not always happen at the same time.
Our current deployment strategy is a mess, we stop the application in IIS and then start another one which shows a holding page saying the site is being updated. We then stop the windows service and manually copy the latest version overwriting the existing website and windows service. We then run a SQL script which has any changes in on the database and then we restart the windows service and IIS application.
This is not sustainable but in my research I have not come across the best option moving forward. I have looked at MSBuild but it is completely new to me and finding somewhere to start with such unfamiliar technology is proving hard. I also looked at FluentMigrator and considered running our database changes from application_start but I am not sure I am comfortable with that.
As we are looking to move to Azure where we will have the site running with 5 different configurations at the moment we are looking at publishing profiles and the hosted build controller but I cannot figure out how to deploy the database with these changes.
I would appreciate some insight into how others handle deployments like this taking into account that we are using all the latest tech, VS2013, VSO, Azure, etc. and also that we need to be able to change the configurations for different customers and I am assuming publishing profiles is the best way to do that but I may be wrong.

Restore Wordpress Database Without Backup

So my web hosting company has restored my hosting files (they were deleted due to a complication), but out of my 4 Wordpress installations 2 of them could not be restored.
I have googled how to restore the database but I only come across people who are restoring from a backup, but I have no backup to restore from; I only have the wordpress files.
What steps must I take to get the sites back online? Ie I guess rebuild the database from scratch but I already have the files (hope that makes sense).
I'm not a programmer or a sql expert, but do have a lot of hosting experience and I can tell you this for sure - if all you have are the Wordpress files (the files in your hosting account) but you don't have a copy of the actual database (usually a .sql file or gzip of it) then you cannot simply restore your Wordpress site content.
The files in your hosting account - the Wordpress files such as index.php and so forth - are not where your posts and page content are stored. They are just files that tell Wordpress how to function. All of your references to the actual content of your posts and pages are stored in the database of your Wordpress.
So, you need the database backup in order to restore your Wordpress to what it was before your mishap.
If you're on typical shared hosting (such as a cPanel host) then you can should be able to access your database through your hosting control panel. Most modern hosts provide you with a hosting control panel that includes direct access to your databases - either through a mySQL tool or phpMyAdmin tool within your hosting control panel.
So for example - if you're on a cPanel host you can log into your cPanel and then click the phpMyAdmin icon to discover the databases you have stored there, and from there you can obtain a copy (export) of your database.
If for some reason you don't have access to a hosting control panel with a tool for accessing your databases, then the next thing would be to get the database through shell (ssh) access, which in a lot of cases is not granted to shared hosting customers.
Ultimately if you have a Wordpress database on the server through your hosting account, your web host can give you a copy of your WP database(s) because they're stored on the web server (either locally on the same server as your web site, or on a mass database server where the host keeps them).
At that point you should submit a request to your host asking for copies / dumps / exports of all your databases, and when they provide you with the database files you could import them back into the corresponding database names via a tool within your hosting control panel (such as phpMyAdmin or mySQL section of your hosting control panel).
Bottom line - you can't restore your Wordpress pages and posts back to what they were without a copy of the database for each Wordpress site you run. Your host has those databases on their server still, unless you accidentally deleted them through one of the tools I've mentioned. If your host tells you that they cannot help you obtain a copy of your database files, then you have a real problem if you don't have your own backup. Database files are not something that you simply upload/download via FTP like your standard html / php files. Database files are stored on the web server of your host and in most cases your host can simply provide you with a dump / export / copy of your databases if you request them. If for some reason you don't have access to a hosting control panel toll where your databases are stored, then request them from your host. If they cannot provide the database file to you and you don't have a backup, then you may be looking at starting from scratch.
As a hosting support tech myself, I can tell you that any good host can easily dump a copy of each of your databases into a folder in your account so that you can import them back using a tool like phpMyAdmin within your hosting account. If they tell you they don't have copies of your databases then you either deleted them (not likely, unless you logged into your control panel and did so unwittingly) or you're with a bad service. (Not jumping to conclusions there, just pointing out the fact that if you didn't remove your databases then they're on the server and any good server admin can give you a copy to restore, along with the instructions.)
It doesn't matter that you have all of the regular files (such as the .php files and .jpg file etc...) on the server if you don't have the database in place that they were connected to, because the database is where much of the content paths and specifics are stored and organized. This characteristic is not exclusive to Wordpress - almost every PHP script is database driven relies on a database for serving the content.
NightOwl's answer is excellent; I would like to add just this. You might have automatic databases backup set up for your account and you don't know it. So I suggest you have a look at your control panel to see whether this is true.
Otherwise, ask again your provider for a more complete restore.

Update Database by republishing

this is my problem:
When working in webmatrix, if I have a published Umbraco site and I need to re-publish it to update the live version to my local version and I need to update the database too, I can't.
Webmatrix will say that the database file is in use. Of course it's in use, 'cause IIS is running on the server, and the site is live, so it's using its database, and it can't be overwritten.
What bugs me the most is that I haven't found any way to overcome this problem, if not by stopping my website's application pool on my server, or restarting the IIS service, but that's too much fuss!
There's got to be a simple way to update the database from Webmatrix.
I usually use a SQL CE database for my Umbraco websites but I can switch if SQL Server is needed.
Please, this is driving me nuts, I hope it's possible and someone will show me the way!
Thanks in advance
You could use the app_offline.htm method outlined here. Basically you can add a file to the root of the website called app_offline.htm and this will allow you to update the database. Obviously, you can format the app_offline.htm page to look like your site and have a some copy stating the site will be back up in a few minutes etc.
On a different note, moving the database to SQL Server causes a similar issue in that, although you can update the db without having to detach it, you still have to prevent people from accessing the site whilst the update is occurring.

How will adding DataSources to DatdGrids in my development version of an ASP.NET web application affect deployment?

I've recently inherited a database driven e-commerce site written in C# ASP.Net, with an MS SQL database.
I have had little or no experience with this exact type of application up to this point, although I am comfortable exploring code, and am familiar with SQL query structure and C# (and web mark-up languages too).
So far I've been able to make all the adjustments I've wanted to to the application, have debugged some stuff, removed some compiler errors, added a few new simple functions, and am enjoying myself rather.
I am experiencing some problems with displaying the information from the database within Visual Web Developer 2008 Express Edition.
Having faced initial setup problems with the web.config file I'm a little wary about the next steps to take!
I currently have a local copy of web.config, which connects to a local copy of the database during development.
When I compile and upload any new versions of the application, I exclude the local version of web.config, so that the remote version uses it's own web.config file to connect to the remote database.
In order to see any of the database information on the web pages during development , I have to run the website in the browser.
Should I be able to see this info in Design View in VS by creating a connection to the database in the database explorer? Will this affect the application when it is running remotely on the webserver? (as the connection would have been made to the local database and not the remote one, and hence the connection string would be different)
All of the DataGrids are blank in VS design view. If I choose a Data Source for them using the Smart Tags in design view, will they use the right Data Source when running remotely? Should I drop the local copy of the database altogether? Connecting to the remote database during development seems rather dangerous to me!
I hope this is clear, any and all help/links/pointers welcome!
Using different Web.config in development and production environment to learn how you can use different configs
Also check Scott's tip, http://weblogs.asp.net/scottgu/archive/2007/09/21/tip-trick-automating-dev-qa-staging-and-production-web-config-settings-with-vs-2005.aspx (Not sure if it applies to Visual Web Developer)

Resources