code: func xmigratedbCommand(c *client) error {
  	args := c.args
  	if len(args) != 6 {
  		return ErrCmdParams
  	}
  
  	addr := fmt.Sprintf("%s:%s", string(args[0]), string(args[1]))
  	if addr == c.app.cfg.Addr {
  		//same server， can not migrate
  		return fmt.Errorf("migrate in same server is not allowed")
  	}
  
  	tp := strings.ToUpper(string(args[2]))
  
  	count, err := ledis.StrInt64(args[3], nil)
  	if err != nil {
  		return err
  	} else if count <= 0 {
  		count = 10
  	}
  
  	db, err := parseMigrateDB(c, args[4])
  	if err != nil {
  		return err
  	}
  
  	timeout, err := ledis.StrInt64(args[5], nil)
  	if err != nil {
  		return err
  	} else if timeout < 0 {
  		return fmt.Errorf("invalid timeout %d", timeout)
  	}
  
  	keys, err := xscan(c.db, tp, int(count))
  	if err != nil {
  		return err
  	} else if len(keys) == 0 {
  		c.resp.writeInteger(0)
  		return nil
  	}
  
  	conn, err := getMigrateDBConn(c, addr, db)
  	if err != nil {
  		return err
  	}
  	defer conn.Close()
  
  	migrateNum := int64(0)
  	for _, key := range keys {
  		err = migrateKey(c, conn, tp, key, timeout)
  		if err != nil {
  			if err == errNoKey || err == errKeyInMigrating {
  				continue
  			} else {
  				return err
  			}
  		}
  
  		migrateNum++
  	}
  
  	c.resp.writeInteger(migrateNum)
  
  	return nil
  }
docs: //XMIGRATEDB host port tp count db timeout
  //select count tp type keys and migrate
  //will block any other write operations
  //maybe only for xcodis