code: @RequestMapping(value = "/api/backup", method = RequestMethod.POST)
      public
      @ResponseBody
      Backup processBackup(@RequestParam("fileData") MultipartFile fileData) throws Exception {
          // Method taken from: http://spring.io/guides/gs/uploading-files/
          if (!fileData.isEmpty()) {
              try {
                  byte[] bytes = fileData.getBytes();
                  BufferedOutputStream stream =
                          new BufferedOutputStream(new FileOutputStream(new File("backup-uploaded.json")));
                  stream.write(bytes);
                  stream.close();
  
              } catch (Exception e) {
              }
          }
          File f = new File("backup-uploaded.json");
          BackupService.getInstance().restoreBackupData(new FileInputStream(f));
          return BackupService.getInstance().getBackupData();
      }
docs: Restore backup data
  
  @param fileData - json file with restore data
  @return
  @throws Exception