%3CLINGO-SUB%20id%3D%22lingo-sub-1390923%22%20slang%3D%22en-US%22%3EBackup%20storage%20consumption%20on%20Managed%20Instance%20explained%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1390923%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EAutomated%20backups%20on%20Managed%20Instance%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EDatabase%20backups%20are%20an%20essential%20part%20of%20any%20business%20continuity%20and%20disaster%20recovery%20strategy%20because%20they%20protect%20your%20data%20from%20accidental%20corruption%20or%20deletion.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EAzure%20SQL%20Managed%20Instance%20automatically%20creates%20the%20database%20backups%20that%20are%20kept%20for%20the%20duration%20of%20the%20configured%20retention%20period%20(1-35%20days%20for%20active%20databases%2C%20and%200-35%20days%20for%20deleted%20databases).%20With%20the%20PITR%20(Point%20In%20Time%20Restore)%20functionality%2C%20it%20is%20possible%20to%20restore%20your%20database%20at%20any%20given%20point%20in%20time%20within%20the%20retention%20period%2C%20and%20with%20one%20minute%20granularity%2C%20providing%20you%20with%20safe%20net%20from%20accidental%20data%20deletion%20or%20data%20corruption.%20To%20learn%20more%20about%20our%20backup%20technology%2C%20see%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsql-database%2Fsql-database-automated-backups%3Ftabs%3Dmanaged-instance%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAutomated%20backups%20for%20SQL%20Managed%20Instance.%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%20much%20automated%20backups%20cost%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECustomers%20will%20get%20the%20equal%20amount%20of%20free%20backup%20storage%20space%20as%20the%20reserved%20data%20storage%20space%20purchased%2C%20regardless%20of%20the%20backup%20retention%20period%20set.%20If%20your%20backup%20storage%20consumption%20is%20within%20the%20allocated%20free%20backup%20storage%20space%2C%20automated%20backups%20on%20managed%20instance%20will%20have%20no%20additional%20cost%20for%20you%2C%20therefore%20will%20be%20free%20of%20charge.%20Exceeding%20the%20use%20of%20backup%20storage%20above%20the%20free%20space%20will%20result%20in%20costs%20of%20about%20%240.20%20-%20%240.24%26nbsp%3Bper%20GB%2Fmonth%26nbsp%3Bin%20US%20regions%2C%20or%20see%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-ERR%3AREF-NOT-FOUND-pricing%20page%26nbsp%3Bfor%20details%20for%20your%20region.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EExample%3A%26nbsp%3B%3C%2FSTRONG%3EFor%20example%2C%20if%20you%20provision%20Managed%20Instance%20with%204TB%20of%20reserved%20data%20storage%2C%20you%20will%20get%204TB%20of%20backup%20storage%20space%20for%20free%2C%20regardless%20of%20the%20database%20backup%20retention%20period%20set.%20The%20provided%20backup%20storage%20space%20is%20used%20for%20all%20databases%20and%20all%20backups%20cumulatively.%20Exceeding%26nbsp%3Busage%20over%20the%20free%20space%20in%20this%20example%20will%20come%20at%20charge.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20a%20general%20guidance%2C%20customers%20with%201-7%20days%20backup%20retention%20on%20their%20databases%20will%20most%20likely%20not%20exceed%20usage%20of%20the%20free%20backup%20space%2C%20whereas%20customers%20with%2035%20days%20backup%26nbsp%3Bretention%20period%20are%20very%20likely%20to%20exceed%20the%20usage%20of%20the%20free%20backup%20space.%20Please%20note%20that%20this%20is%20only%20for%20orientation%20purposes%20and%20not%20necessarily%20the%20case%2C%20as%20the%26nbsp%3B%3CSPAN%3Eexcess%20backup%20storage%20consumption%20will%20depend%20on%20individual%20database%20size%20and%20workload%20usage%20patterns.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%20backups%20pile%20up%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESQL%20Managed%20Instance%20supports%20self-service%20for%20point-in-time%20restore%20(PITR)%20by%20automatically%20creating%20full%20backup%2C%20differential%20backups%2C%20and%20transaction%20log%20backups.%20Full%20database%20backups%20are%20created%20weekly%2C%20differential%20database%20backups%20are%20generally%20created%20every%2012%20hours%2C%20and%20transaction%20log%20backups%20are%20generally%20created%20every%205-10%20minutes%2C%20with%20the%20frequency%20based%20on%20the%20compute%20size%20and%20amount%20of%20database%20activity.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20first%20full%20backup%20is%20scheduled%20immediately%20after%20a%20database%20is%20created.%20It%20usually%20completes%20within%20minutes%2C%20but%20it%20can%20take%20longer%20when%20the%20database%20is%20of%20a%20significant%20size.%20After%20the%20first%20full%20backup%2C%20all%20further%20backups%20are%20scheduled%20automatically%20and%20managed%20silently%20in%20the%20background.%20The%20exact%20timing%20of%20all%20database%20backups%20is%20determined%20by%20the%20SQL%20Database%20service%20as%20it%20balances%20the%20overall%20system%20workload.%20You%20cannot%20change%20or%20disable%20the%20backup%20jobs.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20order%20to%20support%20restore%20to%20any%20point%20in%20time%20within%20the%20retention%20period%2C%20we%20retain%20the%20entire%20%22backup%20chains%22%20(full%20%2B%20differentials%20%2B%20log%20backups)%20between%20each%20full%20backup%20until%20they%20are%20no%20longer%20needed.%20This%20means%20that%20we%20are%20likely%20storing%20multiple%20%22backup%20chains%22%2C%20based%20on%20the%20configured%20retention%20period%20for%20the%20database.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESome%20of%20the%20ways%20you%20could%20cause%20backups%20to%20grow%20excessively%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20list%20provided%20in%20this%20section%20on%20how%20you%20can%20exceed%20the%20free%20backup%20storage%20space%20and%20go%20into%20the%20billable%20excess%20storage%20is%20for%20orientation%20purposes%20only.%20Some%20of%20the%20ways%20which%20can%20influence%20going%20into%20excess%20backup%20storage%20utilization%20are%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EHaving%20long%20backup%20retention%20periods%20than%20needed%2C%20for%20example%2035%20days%20for%20all%20of%20your%20databases%20on%20a%20single%20Managed%20Instance.%3C%2FLI%3E%0A%3CLI%3EFrequently%20adding%20and%20deleting%20large%20databases%2C%20while%20keeping%20a%20high%20backup%20retention%20period.%20For%20example%2C%20creating%20and%20deleting%201TB%20database%20daily%2C%20while%20keeping%20the%20backup%20retention%20period%20for%207%20days%2C%20will%20quickly%20accumulate%20to%20tens%20of%20TB%20of%20excess%20backup%20storage%20in%20a%20month.%3C%2FLI%3E%0A%3CLI%3EYour%20application%20performs%20large%20write%20operations%20more%20frequently%20than%20needed%20-%20for%20example%20frequent%20index%20rebuilds.%3C%2FLI%3E%0A%3CLI%3EYou%20are%20having%20large%20data%20load%20operations%20(especially%20analytical%20data%20mart%20%5C%20DW%20workloads)%20without%20using%20non-clustered%20indexes%20only%20and%20loading%20rows%20of%20more%20than%201%20million.%3C%2FLI%3E%0A%3CLI%3EYour%20application%20is%20heavily%20relying%20on%20using%20permanent%20tables%20for%20temporary%20results%2C%20instead%20of%20TempDB.%3C%2FLI%3E%0A%3CLI%3EYou%20are%20using%20TDE%20encryption%20for%20non-sensitive%20data.%20This%20is%20because%20your%20backups%20are%20compressed%20by%20the%20system%2C%20and%20encrypted%20databases%20cannot%20be%20compressed%20as%20much%20as%20non-encrypted%20databases.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EDISCLAIMER%3A%20Your%20actual%20backup%20storage%20consumption%20can%20depend%20on%20many%20factors%2C%20namely%20backup%20retention%20rate%20and%20apps%2Fworkload%20usage.%26nbsp%3BThe%20above%20examples%20are%20for%20orientation%20purposes%20only.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%20do%20we%20calculate%20excess%20backup%20storage%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20billing%20meter%20for%20PITR%20(%3CSPAN%3ESQL%20Database%20Managed%20Instance%20PITR%20Backup%20Storage)%20is%20charged%26nbsp%3B%3C%2FSPAN%3Eat%20a%20rate%20of%3CSPAN%3E%26nbsp%3Bprice%20(%24)%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eper%20GB%2Fmonth%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3Bwith%20an%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ehour-granular%20billing%3C%2FSPAN%3E.%20The%20basic%20unit%20of%20calculation%20is%201GB%20of%20excess%20backup%20storage%20space%20consumed%20per%20month.%20The%20cost%26nbsp%3Bstated%20on%20the%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fpricing%2Fdetails%2Fazure-sql%2Fsql-managed-instance%2Fsingle%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Epricing%20page%3C%2FA%3E%20means%20that%20in%20order%20to%20get%20charged%20the%20basic%20unit%20of%201GB%20per%20month%20(for%20example%20%240.20%20per%20GB%2Fmonth%2C%20as%20priced%20in%20the%20East%20US%20region)%2C%20your%20had%20to%20have%201GB%20of%20excess%20backup%20storage%20space%20consumed%20for%20the%20entire%20duration%20of%20a%20single%20month.%26nbsp%3B%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3EThe%26nbsp%3B%22hour-granular%20billing%22%20means%20that%20every%20hour%20we%20check%20the%20backup%20storage%20consumption%20and%20communicate%20it%20to%20the%20billing%20system.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESince%20we%20charge%20price%20(%24)%20per%20GB%2Fmonth%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ethe%20excess%20value%20has%20to%20be%20calculated%20from%20a%20monthly%20value%20to%20an%20hourly%20value%3C%2FSPAN%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EExample%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%20type%3D%22disc%22%3E%0A%3CLI%3EAt%2010%3A00am%20today%20the%20backup%20storage%20usage%20for%20all%20databases%20on%20managed%20instance%20was%20750GB.%3C%2FLI%3E%0A%3CLI%3EThe%20reserved%20data%20storage%20(and%20free%20backup%20storage%20space)%2C%20at%2010%3A00am%20today%2C%20was%20500GB.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThis%20means%20that%20at%2010%3A00am%20today%20we%20would%20need%20to%20charge%20for%20250GB%20of%20excess%20backup%20storage%20space%20(500GB%20of%20backup%20storage%20is%20free%2C%20as%20this%20equals%20to%20the%20same%20amount%20of%20reserved%20data%20storage%20space%20purchased%20for%20managed%20instance).%26nbsp%3B%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3EAs%20the%20numbers%20of%20days%20per%20month%20varies%20throughout%20the%20year%2C%20we%20use%2031%20days%20in%20a%20month%20for%20the%20calculation%20formula%2C%20as%20this%20is%20more%20advantageous%20to%20customers%20than%20would%20be%20a%20lower%20value%20of%2030%20or%2028%20days.%26nbsp%3B%3C%2FSPAN%3ETherefore%2C%20we%20calculate%20250GB%20%2F%2031%20days%20%2F%2024hr%20%3D%200.336GB%20to%20transform%20a%20monthly%20charge%20for%20excess%20backup%20storage%20consumption%20(in%20GB)%20to%20an%20hourly%20charge.%20The%200.336GB%20of%20excess%20backup%20storage%20space%20consumed%20for%20this%20hour%20is%20multiplied%20with%20the%20price%20stated%20on%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fpricing%2Fdetails%2Fazure-sql%2Fsql-managed-instance%2Fsingle%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Epricing%20page%3C%2FA%3E%26nbsp%3B(under%20backup%20storage%20section%2C%20point%20in%20time%20restore).%20Please%20note%20the%20price%20varies%20for%20each%20region.%20Let's%20say%20the%20price%20is%20%240.20%20per%20GB%2Fmonth%20for%20your%20region%2C%20therefore%200.336GB%20x%20%240.20%20%3D%20%240.0672%20to%20get%20the%20price%20for%201%20hour%20of%20consuming%20250GB%20of%20excess%20backup%20storage%20space.%20We%20do%20these%20steps%20every%20hour.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELikewise%2C%20if%20you%20would%20like%20to%20understand%20how%20much%201hr%20of%20consuming%201GB%20of%20excess%20backup%20storage%20costs%2C%20we%20can%20take%20the%20example%20price%20of%20%240.20%20per%20GB%2Fmonth%20and%20divide%20it%20by%2031%20days%20and%20by%2024hr.%20Therefore%20%240.20%2F31%20day%2F24hr%20%3D%20%240.000268817%20for%20consuming%201GB%20of%20excess%20backup%20storage%20space%20for%201%20hour%20of%20time.%20Let's%20verify%20this%20in%20reverse%20with%20our%20previous%20example%20of%20calculating%20how%20much%20250GB%20of%20consuming%20excess%20backup%20storage%20costs.%20We'd%20multiply%26nbsp%3B%240.000268817%20for%20consuming%201GB%20of%20excess%20backup%20storage%20space%20for%201hr%20with%20250GB%2C%20therefore%20%240.000268817%20x%20250%20GB%20%3D%20%240.0672.%20We%20get%20the%20same%20price%20of%20%240.0672%2C%20as%20in%20the%20previous%20example%2C%20for%20consuming%20250GB%20of%20excess%20backup%20storage%20space%20for%201%20hour%20of%20time.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%20to%20monitor%20backup%20storage%20consumption%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBackup%20storage%20consumption%20today%20can%20be%20monitored%20using%20Azure%20Cost%20Management.%20The%20tool%20can%20be%20accessed%20from%20the%20Subscription%20overview%20blade%20in%20Azure%20portal.%20You%20can%20use%20filters%20within%20the%20tool%20to%20specifically%20filter%20out%20a%20single%20managed%20instance%20storage%20consumption%20if%20needed.%20For%20details%20see%26nbsp%3B-ERR%3AREF-NOT-FOUND-Learn%20how%20to%20monitor%20backup%20storage%20costs%20for%20SQL%20Managed%20Instance.%20At%20this%20time%2C%20monitoring%20of%20backup%20storage%20space%20consumption%20using%20PowerShell%20is%20not%20available.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ENext%20steps%3A%20How%20to%20fine-tune%20backup%20storage%20consumption%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20recommended%20steps%20on%20fine-tuning%20backup%20storage%20consumption%20and%20excess%20charges%2C%20see%20the%20next%20article%20on%20-ERR%3AREF-NOT-FOUND-Fine%20tuning%20backup%20storage%20consumption%20on%20Managed%20Instance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20track%20when%20automated%20backup%20have%20been%20performed%20on%20Managed%20Instance%2C%20see%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-database-support-blog%2Flesson-learned-128-how-to-track-the-automated-backup-for-an%2Fba-p%2F1442355%22%20target%3D%22_self%22%3EHow%20to%20track%20the%20automated%20backup%20for%20an%20Azure%20SQL%20Managed%20Instance%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EDisclaimer%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPlease%20note%20that%20products%20and%20options%20presented%20in%20this%20article%20are%20subject%20to%20change.%20This%20article%20reflects%20the%20state%20of%20backup%20storage%20tuning%20options%20available%20for%20Azure%20SQL%20Managed%20Instance%20in%20May%2C%202020.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EClosing%20remarks%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3E%3CSPAN%3EThis%20article%20was%20co-authored%20between%20Dani%20Ljepava%2C%20Program%20Manager%20at%20Microsoft%20Azure%20Data%20and%20with%20Vitor%20Tomaz%2C%20Embedded%20Escalation%20Engineer%20(EEE)%2C%20SQL%20Cloud%20at%20Microsoft.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETo%20share%20this%20article%2C%20you%20can%20use%20this%20short%20link%3A%26nbsp%3B%3C%2FSPAN%3E-ERR%3AREF-NOT-FOUND-%3CA%20href%3D%22http%3A%2F%2Faka.ms%2Fmi-backup-explained%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Faka.ms%2Fmi-backup-explained%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1390923%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20this%20article%20you%20will%20learn%20how%20automated%20backups%20on%20Managed%20Instance%20work%2C%20how%20backups%20pile%20up%2C%20what%20can%20cause%20the%20backup%20pile%20up%2C%20and%20how%20are%20the%20costs%20calculated.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22check-backup-storage-cost-sql-mi.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192031i1366D96A51AA05B4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22check-backup-storage-cost-sql-mi.png%22%20alt%3D%22check-backup-storage-cost-sql-mi.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1390923%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EManaged%20Instance%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Automated backups on Managed Instance

 

Database backups are an essential part of any business continuity and disaster recovery strategy because they protect your data from accidental corruption or deletion. Azure SQL Managed Instance automatically creates the database backups that are kept for the duration of the configured retention period (1-35 days for active databases, and 0-35 days for deleted databases). With the PITR (Point In Time Restore) functionality, it is possible to restore your database at any given point in time within the retention period, and with one minute granularity, providing you with safe net from accidental data deletion or data corruption. To learn more about our backup technology, see Automated backups for SQL Managed Instance.

 

How much automated backups cost

 

Customers will get the equal amount of free backup storage space as the reserved data storage space purchased, regardless of the backup retention period set. If your backup storage consumption is within the allocated free backup storage space, automated backups on managed instance will have no additional cost for you, therefore will be free of charge. Exceeding the use of backup storage above the free space will result in costs of about $0.20 - $0.24 per GB/month in US regions, or see the pricing page for details for your region. 

 

Example: For example, if you provision Managed Instance with 4TB of reserved data storage, you will get 4TB of backup storage space for free, regardless of the database backup retention period set. The provided backup storage space is used for all databases and all backups cumulatively. Exceeding usage over the free space in this example will come at charge.

 

As a general guidance, customers with 1-7 days backup retention on their databases will most likely not exceed usage of the free backup space, whereas customers with 35 days backup retention period are very likely to exceed the usage of the free backup space. Please note that this is only for orientation purposes and not necessarily the case, as the excess backup storage consumption will depend on individual database size and workload usage patterns.

 

How backups pile up

 

SQL Managed Instance supports self-service for point-in-time restore (PITR) by automatically creating full backup, differential backups, and transaction log backups. Full database backups are created weekly, differential database backups are generally created every 12 hours, and transaction log backups are generally created every 5-10 minutes, with the frequency based on the compute size and amount of database activity.

 

The first full backup is scheduled immediately after a database is created. It usually completes within minutes, but it can take longer when the database is of a significant size. After the first full backup, all further backups are scheduled automatically and managed silently in the background. The exact timing of all database backups is determined by the SQL Database service as it balances the overall system workload. You cannot change or disable the backup jobs.

 

In order to support restore to any point in time within the retention period, we retain the entire "backup chains" (full + differentials + log backups) between each full backup until they are no longer needed. This means that we are likely storing multiple "backup chains", based on the configured retention period for the database.

 

Some of the ways you could cause backups to grow excessively

 

The list provided in this section on how you can exceed the free backup storage space and go into the billable excess storage is for orientation purposes only. Some of the ways which can influence going into excess backup storage utilization are:

 

  • Having long backup retention periods than needed, for example 35 days for all of your databases on a single Managed Instance.
  • Frequently adding and deleting large databases, while keeping a high backup retention period. For example, creating and deleting 1TB database daily, while keeping the backup retention period for 7 days, will quickly accumulate to tens of TB of excess backup storage in a month.
  • Your application performs large write operations more frequently than needed - for example frequent index rebuilds.
  • You are having large data load operations (especially analytical data mart \ DW workloads) without using non-clustered indexes only and loading rows of more than 1 million.
  • Your application is heavily relying on using permanent tables for temporary results, instead of TempDB.
  • You are using TDE encryption for non-sensitive data. This is because your backups are compressed by the system, and encrypted databases cannot be compressed as much as non-encrypted databases.

DISCLAIMER: Your actual backup storage consumption can depend on many factors, namely backup retention rate and apps/workload usage. The above examples are for orientation purposes only. 

 

How do we calculate excess backup storage

 

The billing meter for PITR (SQL Database Managed Instance PITR Backup Storage) is charged at a rate of price ($) per GB/month with an hour-granular billing. The basic unit of calculation is 1GB of excess backup storage space consumed per month. The cost stated on the pricing page means that in order to get charged the basic unit of 1GB per month (for example $0.20 per GB/month, as priced in the East US region), your had to have 1GB of excess backup storage space consumed for the entire duration of a single month. The "hour-granular billing" means that every hour we check the backup storage consumption and communicate it to the billing system. 

 

Since we charge price ($) per GB/month, the excess value has to be calculated from a monthly value to an hourly value.

 

Example

  • At 10:00am today the backup storage usage for all databases on managed instance was 750GB.
  • The reserved data storage (and free backup storage space), at 10:00am today, was 500GB. 

This means that at 10:00am today we would need to charge for 250GB of excess backup storage space (500GB of backup storage is free, as this equals to the same amount of reserved data storage space purchased for managed instance). As the numbers of days per month varies throughout the year, we use 31 days in a month for the calculation formula, as this is more advantageous to customers than would be a lower value of 30 or 28 days. Therefore, we calculate 250GB / 31 days / 24hr = 0.336GB to transform a monthly charge for excess backup storage consumption (in GB) to an hourly charge. The 0.336GB of excess backup storage space consumed for this hour is multiplied with the price stated on the pricing page (under backup storage section, point in time restore). Please note the price varies for each region. Let's say the price is $0.20 per GB/month for your region, therefore 0.336GB x $0.20 = $0.0672 to get the price for 1 hour of consuming 250GB of excess backup storage space. We do these steps every hour. 

 

Likewise, if you would like to understand how much 1hr of consuming 1GB of excess backup storage costs, we can take the example price of $0.20 per GB/month and divide it by 31 days and by 24hr. Therefore $0.20/31 day/24hr = $0.000268817 for consuming 1GB of excess backup storage space for 1 hour of time. Let's verify this in reverse with our previous example of calculating how much 250GB of consuming excess backup storage costs. We'd multiply $0.000268817 for consuming 1GB of excess backup storage space for 1hr with 250GB, therefore $0.000268817 x 250 GB = $0.0672. We get the same price of $0.0672, as in the previous example, for consuming 250GB of excess backup storage space for 1 hour of time.

 

How to monitor backup storage consumption

 

Backup storage consumption today can be monitored using Azure Cost Management. The tool can be accessed from the Subscription overview blade in Azure portal. You can use filters within the tool to specifically filter out a single managed instance storage consumption if needed. For details see Learn how to monitor backup storage costs for SQL Managed Instance. At this time, monitoring of backup storage space consumption using PowerShell is not available.

 

Next steps: How to fine-tune backup storage consumption

 

For recommended steps on fine-tuning backup storage consumption and excess charges, see the next article on Fine tuning backup storage consumption on Managed Instance.

 

To track when automated backup have been performed on Managed Instance, see How to track the automated backup for an Azure SQL Managed Instance.

 

Disclaimer

 

Please note that products and options presented in this article are subject to change. This article reflects the state of backup storage tuning options available for Azure SQL Managed Instance in May, 2020.

 

Closing remarks

 

This article was co-authored between Dani Ljepava, Program Manager at Microsoft Azure Data and with Vitor Tomaz, Embedded Escalation Engineer (EEE), SQL Cloud at Microsoft.

 

To share this article, you can use this short link: http://aka.ms/mi-backup-explained