Preconditions.checkState(state == State.OPEN,
"Cannot backup MetaTable instance in state %s.", state);
Map<String, TableBackup> backupEntries = new HashMap<String, TableBackup>();
List<String> tables = listTables();
for (String table : tables) {
TableLayoutsBackup layouts = mTableLayoutDatabase.layoutsToBackup(table);
KeyValueBackup keyValues = mTableKeyValueDatabase.keyValuesToBackup(table);
final TableBackup tableBackup = TableBackup.newBuilder()
.setName(table)
.setTableLayoutsBackup(layouts)
.setKeyValueBackup(keyValues)