code: public void copy(final File path, final CopyFlags... flags) {
      requireNonNull(path);
      if (!path.exists()) {
        throw new InvalidCopyDestination("Path must exist");
      }
      if (!path.isDirectory()) {
        throw new InvalidCopyDestination("Path must be a directory");
      }
      final String[] files = path.list();
      if (files != null && files.length > 0) {
        throw new InvalidCopyDestination("Path must contain no files");
      }
      final int flagsMask = mask(flags);
      checkRc(LIB.mdb_env_copy2(ptr, path.getAbsolutePath(), flagsMask));
    }
docs: Copies an LMDB environment to the specified destination path.
  
  <p>
  This function may be used to make a backup of an existing environment. No
  lockfile is created, since it gets recreated at need.
  
  <p>
  Note: This call can trigger significant file size growth if run in parallel
  with write transactions, because it employs a read-only transaction. See
  long-lived transactions under "Caveats" in the LMDB native documentation.
  
  @param path  destination directory, which must exist, be writable and empty
  @param flags special options for this copy