|
@@ -35,6 +35,7 @@ import static org.cobbzilla.util.io.FileUtil.*; |
|
|
import static org.cobbzilla.util.json.JsonUtil.json; |
|
|
import static org.cobbzilla.util.json.JsonUtil.json; |
|
|
import static org.cobbzilla.util.security.CryptStream.BUFFER_SIZE; |
|
|
import static org.cobbzilla.util.security.CryptStream.BUFFER_SIZE; |
|
|
import static org.cobbzilla.wizard.cache.redis.RedisService.EX; |
|
|
import static org.cobbzilla.wizard.cache.redis.RedisService.EX; |
|
|
|
|
|
import static org.cobbzilla.wizard.cache.redis.RedisService.LOCK_SUFFIX; |
|
|
|
|
|
|
|
|
@Service @Slf4j |
|
|
@Service @Slf4j |
|
|
public class RestoreService { |
|
|
public class RestoreService { |
|
@@ -64,6 +65,8 @@ public class RestoreService { |
|
|
|
|
|
|
|
|
public boolean isValidRestoreKey(String restoreKey) { return getRestoreKeys().exists(restoreKey); } |
|
|
public boolean isValidRestoreKey(String restoreKey) { return getRestoreKeys().exists(restoreKey); } |
|
|
|
|
|
|
|
|
|
|
|
public boolean isRestoreStarted(String networkUuid) { return getRestoreKeys().exists(networkUuid + LOCK_SUFFIX); } |
|
|
|
|
|
|
|
|
public boolean restore(String restoreKey, BubbleBackup backup) { |
|
|
public boolean restore(String restoreKey, BubbleBackup backup) { |
|
|
final String thisNodeUuid = configuration.getThisNode().getUuid(); |
|
|
final String thisNodeUuid = configuration.getThisNode().getUuid(); |
|
|
final String thisNetworkUuid = configuration.getThisNode().getNetwork(); |
|
|
final String thisNetworkUuid = configuration.getThisNode().getNetwork(); |
|
|