Describe the bug

Calling DUMP and RESTORE on redis-cli returns an error

To reproduce

$ redis-cli set x a
OK
$ redis-cli DUMP MotoGP > x.rdb
$ cat x.rdb | redis-cli -x RESTORE y 0
(error) ERR DUMP payload version or checksum are wrong

Expected behavior

DUMP shouldn't add an extra \n

Comment From: gkorland

@itamarhaber thanks for the solution

redis-cli -D "" --raw DUMP x > x.dump