long lastLocalClientVersion = lastRemoteMergeDatabaseFile.getClientVersion();
Iterator<DatabaseVersion> lastNDatabaseVersions = localDatabase.getDatabaseVersionsTo(client, lastLocalClientVersion);
DatabaseXmlSerializer databaseDAO = new DatabaseXmlSerializer(config.getTransformer());
databaseDAO.save(lastNDatabaseVersions, lastLocalMergeDatabaseFile);
// Queue files for uploading and deletion
allToDeleteDatabaseFiles.addAll(toDeleteDatabaseFiles);
allMergedDatabaseFiles.put(lastLocalMergeDatabaseFile, lastRemoteMergeDatabaseFile);