@Override
public void restoreData(Configuration config) throws IOException {
File backupDir = new File(config.getBackupDir());
if (backupDir.exists() && (backupDir.isDirectory())) {
FileNameFilter fnf = new FileNameFilter(config.getBackupExtensions());
String[] files = backupDir.list(fnf);
if (files.length > 0) {
Arrays.sort(files);
// Restore the last backup
String fn = files[files.length - 1];