use of org.neo4j.kernel.impl.store.UnexpectedStoreVersionException in project neo4j by neo4j.
the class BackupTool method executeBackup.
BackupOutcome executeBackup(HostnamePort hostnamePort, File to, ConsistencyCheck consistencyCheck, Config config, long timeout, boolean forensics) throws ToolFailureException {
try {
systemOut.println("Performing backup from '" + hostnamePort + "'");
String host = hostnamePort.getHost();
int port = hostnamePort.getPort();
BackupOutcome outcome = backupService.doIncrementalBackupOrFallbackToFull(host, port, to, consistencyCheck, config, timeout, forensics);
systemOut.println("Done");
return outcome;
} catch (UnexpectedStoreVersionException e) {
throw new ToolFailureException(e.getMessage(), e);
} catch (MismatchingStoreIdException e) {
throw new ToolFailureException(String.format(MISMATCHED_STORE_ID, e.getExpected(), e.getEncountered()));
} catch (ComException e) {
throw new ToolFailureException("Couldn't connect to '" + hostnamePort + "'", e);
} catch (IncrementalBackupNotPossibleException e) {
throw new ToolFailureException(e.getMessage(), e);
}
}
Aggregations