I have successfully used dd to clone a partition (/dev/sda2) to an image file on another device (/dev/sdb1) This was done using commands entered into a terminal using a live USB session. My question is can I ditch the usb and just use dd directly on the machine partition I am backing up? Is it just a matter of unmounting the /dev/sda2 partition first? I would ultimately like to use cron to schedule an image file to be created so obviously don’t want to be booting up from usb. Thanks.
People get worried when they see new people use dd.
That said, yes. You can run a script using cron that will
Please ensure you do some kind of check that the partition is indeed unmounted before the dd command runs.