LOG.debug("Reading metadata backup file entry...");
final MetadataBackup backup = fileReader.next();
LOG.debug("Read metadata backup file entry.");
// Check that the dataVersion is compatible with this Kiji instance.
final KijiSystemTable statusTable = kiji.getSystemTable();
final ProtocolVersion curDataVersion = statusTable.getDataVersion();
LOG.debug("Metadata backup data version: " + backup.getLayoutVersion());
LOG.debug("Current data version: " + curDataVersion);
if (!curDataVersion.equals(ProtocolVersion.parse(backup.getLayoutVersion()))) {
throw new IOException(String.format(
"Cannot restore: backup layout version '%s' does not match Kiji instance version '%s'.",