code: func (s *Service) handleBackup(w http.ResponseWriter, r *http.Request) {
  	noLeader, err := noLeader(r)
  	if err != nil {
  		http.Error(w, err.Error(), http.StatusInternalServerError)
  		return
  	}
  
  	bf, err := backupFormat(w, r)
  	if err != nil {
  		http.Error(w, err.Error(), http.StatusInternalServerError)
  		return
  	}
  
  	err = s.store.Backup(!noLeader, bf, w)
  	if err != nil {
  		http.Error(w, err.Error(), http.StatusInternalServerError)
  		return
  	}
  
  	s.lastBackup = time.Now()
  }
docs: // handleBackup returns the consistent database snapshot.