You could create a bootable SD card and then use dd. If networking is up you can use dd to read from the TX2 and write to a PC host. On the other hand, I’m not sure how you would use a “whole” image to do a restore. Unless you are doing something custom (e.g., some sort of secure boot), then only mmcblk0p1 will matter.
Here’s a URL to someone doing this:
https://unix.stackexchange.com/questions/132797/how-to-dd-a-remote-disk-using-ssh-on-local-machine-and-save-to-a-local-disk
Just FYI, if you have SSH keys instead of passwords, then this is trivial. What I do on my embedded systems is to set a password for root, unlock root, do the ssh-copy-id from my host to root@the_remote_address, and then re-lock root. After this a command such as this from my host PC has no password requirement and “just works”:
ssh root@the_remote_address "dd if=/dev/mmcblk0 | gzip -3 -" | dd of=backup_of_mmcblk0.img.gz
FYI, if you have a bootable SD card, then you could in theory restore this by this method as well.
Just to point out something subtle, a mounted file system is a moving target. Any clone of a mounted file system is bound to fail…usually when trying to restore in panic mode. This is one reason to first boot to a rescue SD card.
A second reason is that you are interested in what is on the partition, and if there is something mounted on a subdirectory of the partition, then rsync and anything using the file system itself (instead of the raw partition) will only see the top-most mount files. As an example, if there are device special files in “/dev/” of the partition, and then udev mounts something on “/dev/”, then rsync will fail to find what was on the eMMC. Rsync is usually told to not cross partition boundaries, so you wouldn’t even get the mounted “/dev/” files. If rsync were told to allow crossing boundaries, then you would still get the wrong files…you’d end up with what udev added, and you would miss everything on the actual eMMC which the “/dev” mount has hidden from view.
The root partition is the only one which is actually mounted once boot is complete. You could experiment with and copy other individual partitions without an SD card rescue.