Notes on dd
Monitoring/logging progress
While converting/copying big files, log progress by sending USR1
signal to
the process. For example to log to a file
$ progressFile=/path/to/progress/file.txt
$ dd if=/source/path of=/destination/path >> $progressFile 2>&1
Then in another terminal get the PID of the dd process
$ ps aux | grep dd # get PID
<...>
$ pid=<PID_of_dd_process>
And send signal every n seconds
$ n=60
$ watch --chgexit --interval $n kill -USR1 $pid
Resuming
If the dd process prematurely exits, you can resume by using the option seek
and/or skip
. Check the logs of the process and calculate how many blocks or
bytes remain to be copied.