use of nl.knaw.huygens.timbuctoo.v5.backupforstaging.exceptions.BackupUploadException in project timbuctoo by HuygensING.
the class DatabaseBackupper method makeBackup.
public void makeBackup() throws BackupUploadException {
try {
final File tempFile = File.createTempFile("stagingBackup", "zip");
try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(tempFile.getAbsolutePath()))) {
backupFolder(neo4jPath, zos);
backupFolder(dataSetPath, zos);
}
uploader.storeBackup(tempFile);
} catch (IOException e) {
throw new BackupUploadException(e);
}
}
use of nl.knaw.huygens.timbuctoo.v5.backupforstaging.exceptions.BackupUploadException in project timbuctoo by HuygensING.
the class AzureBlobBackupUploader method storeBackup.
@Override
public void storeBackup(File zipfile) throws BackupUploadException {
try {
final CloudBlockBlob blob = container.getBlockBlobReference(blobname);
blob.upload(new FileInputStream(zipfile), zipfile.length());
} catch (URISyntaxException | StorageException | IOException e) {
throw new BackupUploadException(e);
}
}
Aggregations