private void copyWorkspaces(NodeBuilder root)
throws RepositoryException, IOException {
logger.info("Copying default workspace");
// Copy all the default workspace content
RepositoryConfig config = source.getRepositoryConfig();
String name = config.getDefaultWorkspaceName();
PersistenceCopier copier = new PersistenceCopier(
source.getWorkspaceInfo(name).getPersistenceManager(),
source.getNamespaceRegistry(), target);
copier.excludeNode(RepositoryImpl.SYSTEM_ROOT_NODE_ID);
copier.copy(RepositoryImpl.ROOT_NODE_ID, root);