1

I have a CentOS server and I have take a backup of the server using following command (dd + lz4).

# dd if=/dev/sda bs=100M | pv -ptera -s500G | lz4 > Lenovo-Win8-sda.dd.lz4

It's working and now I want to restore the backup. But I don't know how to do it with lz4 and dd commands?

Glorfindel
  • 805
  • 2
  • 10
  • 19

1 Answers1

2

simply the other way round

unlz4 < Lenovo-Win8-sda.dd.lz4 | dd bs=100M of=/dev/sda

please note that

  • I drop pv command (is that pipe view ?)
  • if /dev/sda is hosting your running OS, you may not have a coherent backup. (as your file is named win8 I guess it might be OK)
  • restoring windows might need to set up boot device as well
Archemar
  • 31,183
  • 18
  • 69
  • 104