Azure Websites - Persistent File Issues - azure

We are looking at migrating some sites from Azure Cloud Services to Azure Websites (as that is how things seem to be going). Cloud services obviously we were told specifically didn't preserve the file system state as they were re-deployed on machine failure.
I am assuming websites are built on Blob storage. Is there a page from Microsoft that confirms if I upload files to the site via FTP etc. that they are persistent, backed up and preserved as part of the site? If they are persistent what are their SLAs? Is there any inbuilt function to backup local files? What happens on instance scale out to files on local file system? Can I get access to the underlying blob storage?
If they are standard is there any issues with letting users upload files in a hosting sense? I appreciate risks of what users shouldn't upload. If files are persistent is it sill best practice to offload to blob storage?

Yes, files that are part of your Web Site are persisted. You can access them via FTP.
You can use the backup service (currently in preview) to schedule backups to blob storage.
The Azure Web Sites SLA is available here: http://www.microsoft.com/en-us/download/details.aspx?id=39303

Related

Migrating from On-Premises File Server to Azure

Today i have a Physical Machine running Windows Server 2008 that servers File to all my employees, so i have a On-Premises File Server.
This On-Premises File Server have a lot of rules based on my Active Directory Server. i.e: Folder "financial" only can be accessed by users in group "manager".
Now i want to migrate this to files to some service in azure cloud, so after some searching i found following options: Blob Storage and File Storage. I think File Storage is ideal for my business but i have some doubts:
Can i apply Active Directory rules in File Storage ? I have AD Sync enable in my azure account.
File storage is better solutions for my case ? If no, what is the other solution ?
No, the closest you can get is using the Azure AD Domain Services (link, another link)
File storage is definitely a better solution, blobs are not really meant to be accessed like a file server.
You might want to look at Azure File Sync, while its not what you ask for exactly, it's pretty close.
https://azure.microsoft.com/en-us/blog/score-one-for-the-it-pro-azure-file-sync-is-now-generally-available/

Best way to store database backup files in azure app service?

I have an app running on Azure app service, I have created some batch scripts which can take backup of the databases (DB running on some other servers i.e. 3rd party cloud db services - Not azure). Question is what is the best way/place to store these backup files in azure app services. Creating a folder named "Backup" in my source directory would overwrite these backups every time code is deployed. Followings are some of the concerns
Security of backup files
Backup files should be easily downloaded whenever I want to restore it
Backup files Shouldn't be overwritten or lost when the deployment is done or app slots are switched.
I was thinking of storing files in %HOME% directory, is it good idea ?
Also is there any size or storage limit with azure app service plans ?
I would recommend that you store the backups outside the Azure app service. Here's some problems with storing the files in App service:
You can't move the app easily from an App Service to an another.
App service has some storage limitations: Free and Shared sites get 1GB of space, Basic sites get 10GB, and Standard sites get 50GB.
It's not easy to access the backups outside of your app.
Instead, Azure Blob Storage is an ideal place for storing large files.
Regarding your concerns:
1) You can make the Azure Blob Storage container private, so that you can only access it if you know the key.
2) There's multiple ways to access the backups stored in Azure Blob Storage:
Azure Storage Explorer is a GUI for accessing the blob storage.
AZCopy which you can easily use from .BAT-files
Simple C#
3) When storing backups in Blob Storage, deployments slots doesn't affect the backups.
Blob storage also offers "Archive" tier which is ideal for storing the rarely used backups.

Migrating Large Content Web App to Azure

I have a large web app with around 20 gigabytes of images and mp3s. It currently uses standard file IO libraries to read and write the sounds and mp3s. I'd like to migrate it to Azure, but I have concerns about storing that much content. Is it possible to use an App Service to host the web app and some sort of storage mounted to the root of the site for the assets without rewritting all of the file access to use blobs or some other api?
If you look at the App Service plans here, you will notice that with Standard and better plans, you get storage more than 20GB (50GB+) so it is certainly possible to take your app as is and run it in Azure. However it is not recommended practice.
What you should do is make use of Azure Blob Storage for storing media content. You will need to make some changes as you can't simply mount Azure Blob Storage as a network drive.
There's Azure Files as well that can be mounted as a network drive but as of today you can't mount a File Share as a network drive in an Azure WebApp. You would need to deploy your application in either a Virtual Machine (IaaS) or rewrite your application to run as a Cloud Service.

Access Azure Files Services from Azure WebSites

As the title says, I'm looking for a way to access an azure files share (in preview) directly from an azure website. I cannot use any REST API or anything like this and I was looking for the possibility of mounting a SMB share directly into the website (through the new portal or any other way).
I found the following links, from which I understand that this is still under review (http://feedback.azure.com/forums/169385-web-apps-formerly-websites/suggestions/6084609-allow-map-azure-file-share-microsoft-azure-file-s) and also a SO question (Can the new Azure File Service be used from Azure WebSites?) that doesn't answer my question.
To be honest and for the sake of giving more details, my scenario is pretty simple - I have some websites and also some virtual machines that should access the files from the azure files service. Regarding the VM, the approach is pretty straight forward and easy but regarding the WebSites, I don't find any way at this moment.
On the other hand, regardless of the answer to the above question, does it make sense to (or do I have the possibility to) enable CDN over an Azure Files Share?
Thank you very much.
As of today, no single technology will serve your purpose. You can't use File Service as you don't have the capability to mount a share in an Azure Website as well as it is not suited for streaming purposes (all access to files there need to be authorized and there's no concept of Shared Access Signature in File Service today).
I guess, you would have to pick one of the two technologies (Blob Service and File Service) and make some compromises to make it work in both Websites and Virtual Machines.
Assuming you go with File Service, then you can mount them in the Virtual Machine and do the processing on the files there. On the website front, you would need to use Storage Client library to download the relevant files in some folder in your website and stream those files from there.
Assuming you go with Blob Service, then you can simply stream them in your website directly from blob storage (no need to have those files in your website). In the Virtual Machine, when you need to process those files (blobs), you would simply download them to your VM for processing and then re-upload them in blob storage.
Does it make sense to (or do I have the possibility to) enable CDN
over an Azure Files Share?
Currently it is not possible to serve Azure File Service files via CDN.

Azure Cloud Web Service, storage options

We are migrating our PHP website to Azure Cloud Web Service (Web Role).
Currently the website saves user submitted image files to the filesystem via drive letter access. These images are then served via a url e.g. content.example.com.
What options have I got id I want persistent file storage on an Azure Cloud Web Service.
I am currently assessing BLOB Storage for this.
Thanks
Blob storage is the right answer. Although you could convert your images in base64 and save them in Azure Sql as well, it is really not recommended.
Check: Azure, best way to store and deploy static content (e.g. images/css)? or Where to store things like user pictures using Azure? Blob Storage?
One of the options to reduce re-writing of your application is to mount blob-storage as a network drive. Here is some information how to do it: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx
Mounting of the drives can be done on Web-Role start-up task and can be scripted.

Resources