code: @RequirePOST
      public void doRestart(StaplerResponse rsp) throws IOException, ServletException {
          HudsonDowngradeJob job = new HudsonDowngradeJob(getCoreSource(), Jenkins.getAuthentication());
          LOGGER.info("Scheduling the core downgrade");
  
          addJob(job);
          rsp.sendRedirect2(".");
      }
docs: Performs hudson downgrade.