MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.24k stars 21.4k forks source link

Restoring backup from database #23788

Closed Mortana89 closed 5 years ago

Mortana89 commented 5 years ago

Hi,

The article is not clear about whether or not restoring from a non-backup store is possible. I'm trying to understand if I can use the Restore process to call an Azure Cosmos DB to do an initial population of the reliable dictionaries?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

mimckitt commented 5 years ago

Thanks for the feedback! We are currently investigating and will update you shortly.

mimckitt commented 5 years ago

@Mortana89 I don't believe that is possible.

@mcoskun @aljo-microsoft could either of you confirm?

Mortana89 commented 5 years ago

Let me put my situation a bit more in context; I'm using Azure Service Bus, together with topics, in a DDD mindset. Every entity change is backed with a' event picked up by any subscriber interested. One of those is a stateful service that could pick up these events to populate a reliable collection. However, I'm not a fan of the backup process from disk, especially not during development. It would make our life much easier if we could hook in a call to the entity store (Cosmos DB) to build the collection from scratch, during development but also during new application pushes. This would also save us from keeping upgrade patterns in mind when the entity structure changed, as we could trigger a Restore via the API.

aljo-microsoft commented 5 years ago

@Mortana89 The backup folder path needs to be a local directory path or UNC:

https://docs.microsoft.com/dotnet/api/microsoft.servicefabric.data.restoredescription.backupfolderpath?view=azure-dotnet#Microsoft_ServiceFabric_Data_RestoreDescription_BackupFolderPath

@MicahMcKittrick-MSFT If this satisfies the user's need. #please-close.

Mortana89 commented 5 years ago

Hi,

No, that isn't what I'm looking for. I'm trying to understand if my described Restore scenario is possible?

mimckitt commented 5 years ago

@Mortana89 based on Alex's response your scenario is not possible.

The backup folder path needs to be on a local directory or UNC. Storing your data in Cosmos DB would not fit either of those requirements.

mimckitt commented 5 years ago

@Mortana89 I will close for now. If you have further questions just let me know and we can always reopen and continue the conversation.

Mortana89 commented 5 years ago

It doesn't really solve my issue. How can I achieve my desired scenario then?

mimckitt commented 5 years ago

@Mortana89 since the scenario you are looking at is not possible and you still want to utilize backup you would have to go with the backup scenario as described in the docs and is supported. One that is based on a local directory or UNC.

You can also look at the docs on disaster recovery which you might find useful

https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-disaster-recovery

In addition, you can leave feedback for a product feature that would allow you to go with your desired scenario

https://feedback.azure.com/forums/293901-service-fabric

Unfortunately I am not sure what else to suggest if it is not possible to implement this in the way you want. There are always scenarios that are not possible due to design decisions that were made and unless those are changed there is not much that can be done.

Mortana89 commented 5 years ago

Thanks for the information provided, I'll dig into it. Definitely appreciate your response! Another approach I could take, is listening to An event of a specific type, and populating the reliable dictionary upon receiving that event, but An issue I see here is concurrency (processes running on stale data). Hence I thought of the lossasync method as a last resort to make sure nothing Else is doing anything, and populating the dictionary there.