} catch(IOException e) {
// If the destination file exists, delete it
if(dest.exists()) {
dest.delete();
}
throw new VoldemortException("Error occured while copying "
+ name
+ ". Deleting to ensure we don't have a corrupt backup.",
e);
}
total += source.length();
}
if(isIncremental) {
try {
recordBackupSet(backupDir);
} catch(IOException e) {
throw new VoldemortException("Error attempting to write backup records for ", e);
}
} else {
cleanStaleFiles(backupDir, status);
}
}