Flash Drive Backup
Running a full install on usb flash drive. Obviously at some point the usb flash drive will exceed write wear and die. So keeping a duplicate of the active one for when that happens.
Is this a good way to make a backup of the active usb flash drive? Or is there a better way?
dd if=/dev/da0 of=/dev/null bs=1m # Check for Error
dd if=/dev/da0 of=/dev/da1 bs=1m # Copy Flash Drive Image
I do a similar thing to backup a 1GB solid state disk module to another.
dd reads and writes bypass the file system so I don't think the second sync does anything particularly useful.
I have seen errors reported on some flash drives when using "large" block sizes. I suppose the optimum block size would be the flash drive page size but I don't know a generic way of finding that out.
I have been running pfSense full install on a Transcend 1GB solid state disk module for over 3 years without problem. But such modules are intended to be disk replacements unlike common USB flash drives which are intended for "read man, write few" applications.