Ssh – DD over SSH from Server to Server

ddssh

Is it possible to DD one server to another? Maybe through SSH? I've looked around and I have seen examples of DD using SSH from local to server and vice versa, but is it possible to do it from server to server?

Another question that relates is what software does Digital Ocean use to create the snapshots of their servers that can then be later restored?

Thanks,

Best Answer

Sure, though it's a little clunky. You can do something like:

$ ssh server1 'dd if=/some/file' | ssh server2 'dd of=/new/file/path'

and it'll work. You could tweak the block side on both sides (pass bs=1m or whatever to both dd commands) for a speedup with some testing.

No idea about Digital Ocean: you'll probably want to ask them, or start another question here if you think someone might know.