I have some gzipped files I want to transfer to a remote server and extract directly onto the target drive.
It is similar to this command
dd if=/dev/sda bs=5M conv=fsync status=progress | gzip -c -9 | ssh user@DestinationIP 'gzip -d | dd of=/dev/sda bs=5M'
From this question on Server Fault.
In my case the file is already compressed so the gzip -9 on the source will not be necessary.
It would be more along the lines of:
load-some-file /drive/image.tar.gz | ssh user@DestinationIP 'gzip -d | dd of=/dev/sda bs=5M'
What command should load-some-file be?
Will a command like cat suffice, or will dd itself do?
Can the output of dd be sent to the ssh command directly?