code: @Override
      public Collection<Throwable> restoreRepository(final FedoraSession session,
                                        final File backupDirectory) {
          final Session jcrSession = getJcrSession(session);
          try {
              final RepositoryManager repoMgr = ((org.modeshape.jcr.api.Session) jcrSession)
                      .getWorkspace()
                      .getRepositoryManager();
  
              final Collection<Throwable> problems = new ArrayList<>();
  
              repoMgr.restoreRepository(backupDirectory).forEach(x -> problems.add(x.getThrowable()));
  
              return problems;
          } catch (final RepositoryException e) {
              throw new RepositoryRuntimeException(e);
          }
      }
docs: /*
  (non-Javadoc)
  @see
  org.fcrepo.kernel.api.services.RepositoryService#restoreRepository(javax.
  jcr.Session, java.io.File)