Is there a way to dynamically create folders in BLOB so each DB goes into its own folder? I know in Azure BLOB Storage they are not real folders, but I hope you get my point. In essence I am using the @URL instead of @directory

I am backing up (TLog) 30+ DB's every 5 minutes, and it is very cumbersome to manage in BLOB.

Any insight or help would be appreciated.


  • 1
    Could you elaborate a bit on what you are trying to achieve? Currently it's quite hard to fathom, what you want from the community. Is it related to a backup job that you are running with Ola's scripts? (Assuming the tags are correct). If you supply the community with more information, then the community will gladly help out (...if we can). Please edit) your question and add more specifics of what you have tried so far. – John K. N. Oct 24 '17 at 6:11

I haven't seen any OOTB way to do this. I've had similar issues with backing up to Azure BLOB, though, (it can't handle stripes) so I generally have used PowerShell to fill in the gaps:

  1. Perform your backup to disk
  2. Use PowerShell + AZCopy to upload files to Azure Blob using Ola's default directory structure on your local disk.

I usually wrap both these into a SQL Agent job for backup and have had good results.

  • Thanks so much for the answer. Mgmt is trying to get me to not dump locally first, to save on the storage. I know minimal cost, but just trying to follow up with management. This will be my plan if no one else knows a way to direclty do this. – Steve Oct 23 '17 at 20:25
  • I mean, you could probably use Powershell + dynamic SQL to accomplish all this by having a separate backup step for each database or looping through them all with a ForEachDB variant, but it is awful enough that I don't want to detail it, lest anyone think it a good idea. Slightly less gross would be dumping them to the BLOB root then running a script to move them around afterwards, but that copy process isn't ideal either. – LowlyDBA - John McCall Oct 23 '17 at 20:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.