Guest User

Untitled

a guest
Mar 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. protected override async Task RunAsync(CancellationToken cancellationToken)
  2. {
  3. // ...
  4.  
  5. while (true)
  6. {
  7. cancellationToken.ThrowIfCancellationRequested();
  8. BackupDescription myBackupDescription = new BackupDescription(BackupOption.Full, this.BackupCallbackAsync);
  9. await this.BackupAsync(myBackupDescription);
  10.  
  11. // ...
  12.  
  13. await Task.Delay(TimeSpan.FromSeconds(1), cancellationToken);
  14. }
  15. }
  16.  
  17. private async Task<bool> BackupCallbackAsync(BackupInfo backupInfo, CancellationToken cancellationToken)
  18. {
  19. var backupId = Guid.NewGuid();
  20. // backup files copied to external storage here ...
  21. return true;
  22. }
  23.  
  24. Connect-ServiceFabricCluster
  25. $s = "fabric:/WebReferenceApplication/InventoryService"
  26. $p = Get-ServiceFabricApplication | Get-ServiceFabricService -ServiceName $s | Get-ServiceFabricPartition | Select -First 1
  27. $p | Invoke-ServiceFabricPartitionDataLoss -DataLossMode FullDataLoss -ServiceName $s
Add Comment
Please, Sign In to add comment