public class Backup extends ServiceEndpoint
Currently, the backup hive node only supports store the backup data of the vault service, and promote the backup node to the vault node. The old vault will be disabled after this promotion.
Before using promotion service, the subscription for the backup service is required on backup hive node.
BackupSubscription subscription = new BackupSubscription(appContext, providerAddress);
subscription.subscribe().get();
And then, execute the backup operation on the vault hive node.
Vault vault = new Vault(appContext, providerAddress);
BackupService backupService = vault.getBackupService());
backupService.startBackup().get();
The third step is executing the promotion operation.
PromotionService promotionService = new Backup(appContext, providerAddress);
promotionService.promote().get();
| Constructor and Description |
|---|
Backup(AppContext context,
java.lang.String providerAddress) |
| Modifier and Type | Method and Description |
|---|---|
PromotionService |
getPromotionService() |
getAccessToken, getAppContext, getAppDid, getAppInstanceDid, getLatestCommitId, getNodeVersion, getProviderAddress, getServiceDid, getServiceInstanceDid, getStorage, getUserDid, refreshAccessTokencreateService, openConnectionpublic Backup(AppContext context, java.lang.String providerAddress)
public PromotionService getPromotionService()