I have used the command line below to backup a key into a file . The file size is 1.5GB . It is a hash key with many many fields .
redis-cli --raw dump mykey | head -c-1 > myfile
When I used the command line below to restore the key , I always got " Connection reset by peer ", I changed to use redis python client , got the same error as "Error 104 while writing to socket. Connection reset by peer." When I changed to a 500MB hash file with one key for same operation , it got no problem and successfully restored . I have set max memory for redis is 9GB and RAM is 14GB . Redis database size is 1.5GB .
cat myfile | redis-cli -x restore mynewkey 0
I guess it might be redis limitation for 1GB input buffer problem .
Is there any solution I can either reduce the dumped file size when redis dump or increase the input buffer to allow file more than 1GB .