Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Based on scripts found in this forum, some time ago I modified fun_plug so a USB thumb drive was mounted during the boot process. Also as part of the configuration process ffp was configured so it run from the USB drive unless for some reason the USB drive failed to initiate. When the USB drive fails to initiate, ffp runs from the HD.
Tonight while installing packages associated with UPS support I realized files stored in the ffp directory on the USB drive no longer are in sync with those found in the ffp directory of the HD (/mnt/HD_a2/ffp).
Being somewhat new to Linux I'm unfamiliar with all the commands. I thought of using the copy command with the -p and -r switches; copy files from the USB drive to the HD then copy them from the HD to the USB drive. This would be achieved using cp -p -r /mnt/USB/ffp/* /mnt/HD_a2/ffp and then using cp -p -r /mnt/HD_a2/ffp/* /mnt/USB/ffp to bring the directories up to date.
I know this approach will mess up log files and any other file that have been modified since first copying ffp from HD_a2 to the USB drive however I feel there would be little impact as many, if not all installs and updates have been performed with the USB Drive active (Thus the reason for starting the CP command with the USB drive)
Is there a better way to synchronize the two directories? I thought of rsync but could not figure out the switch and path detail.
Bob Blackwell
Pickering, ON
Last edited by rcblackwell (2008-07-24 03:46:27)
Offline
I would not use the copy method, at least not the way you intend to. If you would do it like that then you will also copy "zombies" (e.g. leftovers from previous installations) from your HD to the USB stick. This will mess up your installation. If you normally use the stick and this is your most current version of ffp why not do this? ->
rm -r /mnt/HD_a2/ffp
cp -r /mnt/USB/ffp /mnt/HD_a2/
For me this would be the best solution.
Offline
cp -a /mnt/USB/ffp /mnt/HD_a2/ is the better alternative because it a) preserves file attributes and b) copies symlinks as well.
Offline
KyleK wrote:
cp -a /mnt/USB/ffp /mnt/HD_a2/ is the better alternative because it a) preserves file attributes and b) copies symlinks as well.
I'd use
rsync -av --delete /mnt/USB/ffp /mnt/HD_a2
This will not only preserve attribs and links, but also delete obsolete files from /mnt/HD_a2. You can also 'test' it by adding '--dry-run' after '--delete' to first see what it will actually do.
Offline
rcblackwell wrote:
Is there a better way to synchronize the two directories?
I'm in sync once again. Many thanks to all.
Bob Blackwell
Pickering, ON
Offline