docs: boolean closeForBackup() {
  
          if (filesReadOnly) {
              return false;
          }
  
          deleteNewAndOldFiles();
  
          try {
              writeScript(false);
          } catch (HsqlException e) {
              deleteNewScript();
  
              return false;
          }
  
          if (cache != null) {
              try {
                  cache.close(true);
                  cache.backupFile();
              } catch (Exception e) {
  
                  // backup failed perhaps due to lack of disk space
                  deleteNewScript();
                  deleteNewBackup();
  
                  try {
                      if (!cache.isFileOpen()) {
                          cache.open(false);
                      }
                  } catch (Exception e1) {}
  
                  return false;
              }
          }
  
          try {
              properties.setDBModified(HsqlDatabaseProperties.FILES_NEW);
              closeLog();
          } catch (Exception e) {}
  
          deleteLog();
          renameNewScript();
          renameNewBackup();
  
          try {
              properties.setDBModified(
                  HsqlDatabaseProperties.FILES_NOT_MODIFIED);
          } catch (Exception e) {}
  
          return true;
      }