Device oriented or partition oriented cloning or backup tool
There are alternative device oriented or partition oriented cloning or backup tools.
Speed
You have used dd
which is a very basic tool, that clones, copies every byte.
Clonezilla is another device oriented or partition oriented cloning or backup tool. It can tell the difference between blocks, that contain file data and free blocks, and it clones/copies only blocks that contain file data plus the data that contain information about the partition table and metadata of the file system in each partition. This makes Clonezilla faster than dd
, particularly when there is a lot of free space on the device.
Security
dd
is notoriuosly dangerous and deserves the nickname 'Data Destroyer' becauses it does what you tell it to do without questions. If you tell it to delete the family pictures ..., and it is a minor typing error away.
Clonezilla has checkpoints, where you can double-check, that you will be writing to the correct target device (and not to the device (the main drive or an external drive), where you store valuable data).
Modes of operation
Clonezilla can either clone directly, or create a compressed image of a whole device. This image is a a directory with several files, where the big files are compressed. Clonezilla can restore from an image to a new device (drive) with the same size or bigger, so that you can get a working system with the same properties as the original system, a clone.
Clonezilla can also {clone/make a compressed image} of one or more partitions separately, but in this case there will be no complete image to restore a complete clone of the original system.
What to do in your particular case
I think that a Clonezilla image file will be small enough in your case to fit in the target drive, at least if the original source drive is far from full with already compressed data. So you can try to back up your data by creating an image file of the whole source drive.
In order to rely on the backup, you should get a third drive, of at least the same size as the original source drive, and try to restore from the image to this third drive. It should work as a replacement of the original drive.
If this is 'too much' for you, if it is enough to backup your personal data and maybe some of the settings in your computer, a file oriented backup according to @waltinator's answer will be better.
dd
is pretty slow on most devices if you don't use a more appropriate block size than the default 512 byte. For modern drives 8, 16 or 32 MiB should be fine. – David Foerster Sep 15 '17 at 22:08dd
reaches full speed at bs=4096 bytes. Not much happens after that. I think many tools and systems handle batches of 4096 bytes. See this link, https://askubuntu.com/questions/931581/flashing-ubuntu-iso-to-usb-stick-with-dd/931588#931588 – sudodus Sep 16 '17 at 06:57dd bs=512
can move data at about 1.7GB/s. You need a very slow CPU beforedd bs=512
becomes the bottleneck at 40MB/s. – marcelm Sep 18 '17 at 14:08dd
s blocksize. If you're doing linear reads, Linux will do readahead from the source, using whatever I/O operations it deems most efficient, and then hands the results todd
in whatever block sizedd
is using. So the block size fordd
only affectsdd
<-> kernel communications, and nothing else. – marcelm Sep 18 '17 at 16:36