List of usage examples for org.apache.solr.client.solrj.request CollectionAdminRequest backupCollection
public static Backup backupCollection(String collection, String backupName)
From source file:org.codice.ddf.commands.solr.BackupCommand.java
License:Open Source License
private boolean backup(SolrClient client, String collection, String backupLocation, String backupName) throws IOException, SolrServerException { CollectionAdminRequest.Backup backup = CollectionAdminRequest.backupCollection(collection, backupName) .setLocation(backupLocation); CollectionAdminResponse response = backup.process(client, collection); LOGGER.debug("Backup status: {}", response.getStatus()); if (response.getStatus() != 0) { printErrorMessage("Backup failed."); printResponseErrorMessages(response); }//from www . j a v a 2 s. co m return response.isSuccess(); }