February 2012 - Artículos

Today I can finally speak publicly about a new cloud service that has seen the light and I had the pleasure of participating in CTP phase.

Since SQL Azure is available on the market, one of the main workhorses has been how to implement backups of our databases. Initially the only way I had was to make a copy of the database in another SQL Azure, which meant the cost of having to pay for the additional database. Later began to appear new tools that allowed the export/import the data and schemas through SQL scripts or through the new “bacpac” format. A good summary of them was made on this Luis Panzano’s blog entry, showing the advantages and disadvantages of each of them.

All these previous solutions is in addition of a new backup solution for SQL Azure, nothing more and nothing less than from the hand of Redgate, widely recognized worldwide for its database products.

What is it?

RedGate Cloud Services is a new cloud service for backing up SQL Azure databases in an automated and scheduled way, without having to perform any task that requires complex or depth technical knowledge of the Azure platform.

The new RedGate’ service allows, using the export/import "bacpac" file format, automated backing up through a very simple user interface.

And while this simple interface simplifies the way we perform the backup, one of the most interesting options is the ability to schedule them. Scheduling options are initially not many, but the feedback from the community is doing to implement all the new scheduling needs required.

Where are backups stored?

While from my point of view is that the most recommended option is to store backups in Azure Storage since involves no data transfer costs -remember that the internal data traffic in the same Azure datacenter only is not charged-, there are another two interesting options: backup on Amazon S3 or sent to an FTP server, very interesting options to have automated copies in different storage locations for redundancy, even if we must pay the additional cost of data transfer.

What is ideal for?

Although from the Azure control panel we can manually export databases in the “bacpac” format to Azure Storage -this service is no longer CTP and is fully supported-, the main problem is that current utility on Azure control panel does not allow scheduled backups, so that to perform a daily backup we should visit daily the Azure control panel and run the process manually.

With this new Redgate’ service we can schedule different backups for the same or different databases through a simple user interface, which frees us from having to perform the backup tasks manually. Furthermore, we can access the historical backups logs, receive email notifications, etc..

How much does it cost?

Like most services in the cloud its formula is pay per use, and although the current formula adheres to a single offer of 8€/month (31 uses per month), I guess in the coming weeks will be appearing more options for price escalation as recognized by the Richard Mitchell on the home page.

It should be noted that this price is for the backup service. Does not include storage costs for Azure Storage (storage account isyour own), nor the costs of traffic in the case of using external storage like Amazon or FTP account.

On the other hand, is also offering a free trial period of 10 days without charge.

Conclusion

A few weeks ago, I commented that I upgraded to DotNetNuke 6.1.3 three different sites running on Azure in just 9 minutes, including backups. Now you know the method used to back up the databases. The part of details of how to do the upgrade of DNN sites on Azure I leave for another post.

While the current service could offer much more, precisely Redgate people are taking good note of each new required feature. Believe me, I had the pleasure of having applied for a feature and implemented within a reasonable time. Indeed, it seems that the service will offer many more options soon, as being able to deploy and/or eliminate Azure deployments in a scheduled way.

What I like: scheduling and to receive daily email notifications telling me that the SQL Azure backup has been successful. Although it may seem silly, reassures ... a lot. Have I discussed with you my incident when I clicked the "Delete Azure SQL server" instead of "Delete Azure Database"? Well, that's another story...

After a busy January I’m back again to write some pending entries that I have promised to some people. There are lots of things to tell after the DNN-Cloud session in the DNN Europe Task Force Meeting 2012, things like: how to upgrade a DNN version on Windows Azure, how to do backup and restore operations, how to move an instance from on premise to Azure and vice versa, etc. so let start one by one.

To begin, let’s see how to solve a typical error when deploying DNN on Windows Azure, since at least 4 people have asked to me how to fix it in the past two weeks. The error message appears when you deploy the package on a service, and means that the certificate specified in the service configuration file is not configured on the Windows Azure service:

“The certificate with thumbprint ‘XXXXXXXXXX’ is missing for hosted service ‘YYYY’. Please install the certificate for this hosted service.”

This is because you didn’t upload correctly the certificate, which is used to encrypt communications while using RDP or Windows Azure connect (Virtual Network).

NOTE: in future versions of DNN Azure Accelerator this problem will be fixed using another method for uploading the package, using the Windows Azure publishing settings. Meanwhile, you have to upload manually the certificate to Azure as specified below.

What certificate?

The error refers to the certificate used in the DNN Azure Accelerator to configure RDP. In fact, there is a text indicating that you have to upload this certificate to the hosted service on Azure, but actually there is not much help on how to do this, because although currently the Accelerator automatically generates the certificate in a “.cer” file in the wizard folder, it must be imported into Windows Azure as a “.pfx” file.

How to export the certificate in PFX format?

To export the certificate in PFX format from the DNN Azure Accelerator wizard RDP step, follow these steps:

Click “View…” to see the certificate that has generated the wizard

Go to the tab “Details”. In the certificate properties, we can see the “Thumbprint” of this certificate, which is precisely the one referred by the error and stored in the service configuration file.

Click the “Copy to File…” to open the export wizard indicating that you want to export the private key. This is mandatory to export in PFX format.

In the next step, select the format “PFX” and activate the check boxes for “Include all certificates in the certification path if possible” and “Export all extended properties”. Uncheck the box “Delete the private key if export is successful”, as means to delete it from your local computer certificates storage instead of the exported file.

In the following steps specify a password to be used while importing into Azure and finally a filename for the certificate.

With this we have exported the PFX file.

How to import the certificate on Azure?

This step is very well documented in numerous websites and in Windows Azure’s help, but here again to not have to open another page and for printing purposes –remember to save the trees!:

Press the “Add Certificate…” button to upload the “PFX” file that we have exported typing the password used before.

Once that is done, we can see that the certificate was successfully uploaded and that in the certificate details the “Thumbprint” is also there.

I closed the Accelerator and now I do not know how to re-export the certificate

It may happen, or at least that’s what happened to those who asked me about this problem, you forget to export the certificate in PFX format when using the DNN Azure Accelerator. Is there another way to export if I closed the assistant and/or deleted the “.cer” file that was created in the wizard folder?

There are several methods to accomplish that, but for simplifying the shortest is:

In a command line console, type “certmgr.exe” to open the certificates management console in the folder “Personal\Certificates”

If you remember the “FriendlyName” that you used in the DNN Azure Accelerator, select it. If not or not be sure of which certificate you used on the wizard, you will have to open one by one and select the one with the property “Thumbprint” which matches the error message –the property is on the Details tab page.

Right-click on “All tasks>Export…” to start the export process mentioned in the previous section

With this, once we have exported and loaded the certificate in the same way as indicated in the previous steps, we can deploy our service without problems.