On Fri, 24 Aug 2018 04:32:23 -0400, Philip Webb wrote: > I want to make a copy of a partition which I can use to replace it, > if some catastrophe damages the partition or wipes it out ; > it needs to be byte-byte identical, incl all permissions. > > Can I use 'dd' ? -- eg 'dd if=/mnt/xxx of=/mnt/yyy', > where the partition has been mounted at /mnt/xxx > & a USB stick has been mounted at /mnt/yyy . Will that do the job ?
It will, provided the USB stick is large enough. > There seems also to be an issue re 'bs=<some number of bytes>' : > what size is best ? i plan to use USB 3.0 for quicker copying. I usually use 4M but anything over 1M gives similar results. These days I use dcfldd rather than dd and it gives a nice progress display and also works out the block size for itself. > Does it matter how the USB stick is formatted ? > Can I use a raw stick with the usual default VFAT formatting ? > Might it be better to replace that with a Linux FS, eg Ext2 ? It doesn't matter how the stick *was* formatted because you are overwriting it when you dd. The resulting stick won't even have a partition table. Alternatively, format the stick and dd to a file on the stick. Bear in mind that dd copies the whole partition, including the bits (and bytes) not currently in use by the filesystem, so it is inefficient in space terms. If you just want a backup of the contents of the partition, would tar not suffice? -- Neil Bothwick If Yoda so strong in force is, why words in right order he cannot put?
pgp16LwOCEmjJ.pgp
Description: OpenPGP digital signature