Mithun Ganatra
Mithun Ganatra

Reputation: 453

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

  1. Security of backup files
  2. Backup files should be easily downloaded whenever I want to restore it
  3. 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 ?

Upvotes: 0

Views: 521

Answers (1)

Mikael Koskinen
Mikael Koskinen

Reputation: 12906

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:

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.

Upvotes: 3

Related Questions