code: @NotNull
      public static File backup(@NotNull final Backupable source, @NotNull final File backupRoot,
                                @Nullable final String backupNamePrefix, final boolean zip) throws Exception {
          if (!backupRoot.exists() && !backupRoot.mkdirs()) {
              throw new IOException("Failed to create " + backupRoot.getAbsolutePath());
          }
          final String fileName;
          if (zip) {
              fileName = getTimeStampedZipFileName();
          } else {
              fileName = getTimeStampedTarGzFileName();
          }
          final File backupFile = new File(backupRoot, backupNamePrefix == null ? fileName : backupNamePrefix + fileName);
          return backup(source, backupFile, zip);
      }
docs: For specified {@linkplain Backupable} {@code source}, creates backup file in the specified {@code backupRoot}
  directory whose name is calculated using current timestamp and specified {@code backupNamePrefix} if it is not
  {@code null}. Typically, {@code source} is an {@linkplain Environment} or an {@linkplain PersistentEntityStore}
  instance. Set {@code zip = true} to create {@code .zip} backup file, otherwise {@code .tar.gz} file will be created.
  
  <p>{@linkplain Environment} and {@linkplain PersistentEntityStore} instances don't require any specific actions
  (like, e.g., switching to read-only mode) to do backups and get consistent copies of data within backups files.
  So backup can be performed on-the-fly not affecting database operations.
  
  @param source           an instance of {@linkplain Backupable}
  @param backupRoot       a directory which the backup file will be created in
  @param backupNamePrefix prefix of the backup file name
  @param zip              {@code true} to create {@code .zip} backup file, rather than {@code .tar.gz} one
  @return backup file (either .zip or .tag.gz)
  @throws Exception something went wrong