Suppose you mount that USB device as follows:
I assume that these are Linux type filesystems (ext2, ext3, jfs, .....)
/sbin/mount -n -o remount,ro /dev/sdc1 # remount readonly
rm -fr /mirror/scd1/* # remove previous stuff
tar -l -cpf - /mount_point_of_dev_scd1 | tar -C /mirror/scd1 -pxf -
And after a while you've got a nice copy of that FS.
The rm -fr ... may be substituted by something like this:
#fuser -m /mirror/sdc1
mke2fs -v -c -m 1 -N 500000 -b 4096 /dev/<usb_storage_1>
otherwise you'll loose the Lost+Found directory.
This is the bare essence, you'll probably need to script this with many
checks to make sure nothing is going wrong and all necessary prec-conditions
This way I usually clone my rootfs (/), but without mount it read-only,
Do not use dd, major catastrophes might occur.
Hope this helps a bit
> I have a USB external mass storage drive on which I intend to mirror two
> drives as a backup by using a command such as dd.
> To do this, I need to see the external device as a whole, and so need a
> common mount point. I've divided the external drive into partitions
> corresponding to those on my primary drives (sdc1, sdc2...), but where do
> I mount them.
> For example, can I create a /mnt directory in the external drive's /sdc5
> partition and then mount each of its directories (sdc1, sdc2...) to it
> (including sdc5) and then direct the backup to the external /mnt
> Haines Brown