2

I am currently using a combination of dd, gzip and nc to remote backup the flash of an arm board.

dd if=/dev/nand conv=sync,noerror bs=64K | gzip -c -9 | nc 192.168.0.123 8000

I'd like to ask whether there is an efficient way to omit nc and transfer the data via ssh.

Furthermore, I am also looking for a solution where the backup process is initiated by the 'backup server'.

4

2 回答 2

2

Something along these lines?

dd if=/dev/nand conv=sync,noerror bs=64K | gzip -c -9 | ssh user@server 'cat - > backup.gz'
于 2013-10-10T08:59:41.777 回答
0

I'm not so sure that sync is a good conversion flag to use. The dd man page says:

   sync   pad  every  input block with NULs to ibs-size; when used with block or unblock, pad
          with spaces rather than NULs

I don't think you want to pad with anything. Perhaps this was meant to be passed to iflags instead:

   dsync  use synchronized I/O for data

   sync   likewise, but also for metadata

or perhaps direct instead:

   direct use direct I/O for data

which is slightly faster on my Cubieboard2's nand.

于 2013-10-15T18:52:29.007 回答