docs: void backup() throws ConfigurationPersistenceException {
          if (!doneBootup.get()) {
              return;
          }
          try {
              if (!interactionPolicy.isReadOnly()) {
                  //Move the main file to the versioned history
                  moveFile(mainFile, getVersionedFile(mainFile));
              } else {
                  //Copy the Last file to the versioned history
                  moveFile(lastFile, getVersionedFile(mainFile));
              }
              int seq = sequence.get();
              // delete unwanted backup files
              int currentHistoryLength = getInteger(CURRENT_HISTORY_LENGTH_PROPERTY, CURRENT_HISTORY_LENGTH, 0);
              if (seq > currentHistoryLength) {
                  for (int k = seq - currentHistoryLength; k > 0; k--) {
                      File delete = getVersionedFile(mainFile, k);
                      if (! delete.exists()) {
                          break;
                      }
                      delete.delete();
                  }
              }
          } catch (IOException e) {
              throw ControllerLogger.ROOT_LOGGER.failedToBackup(e, mainFile);
          }
      }