But to do a dump and restore remotely we need to install a npm package:

[sudo] npm i redis-dump -g
Install redis-dump

Backup:

redis-dump -p 6379 -h localhost -d 1 > backup_db1.txt
backup db 1
cat backup_db1.txt | redis-cli -h remote_host -p remote_port -d 1
Restore db 1 in remote redis

Source: medium.com/@fabiomiguelmello/backup-and-restore-redis-database-remotely-5b619903697e