Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'this trick helps archive management on dumb file servers' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
this trick helps archive management on dumb file servers
Authored by: rose00 on Dec 12, '05 12:15:45PM
This is just the fix I need.

I archive old files in disk images on a CIFS network disk. This works pretty well, despite the weaknesses of CIFS, since the Apple file system details are inside the disk images. But my file server (low-end Buffalo) does not allow me to lock the files.

So one thing that has not worked well is the fact that whenever I open an archived disk image, Finder writes back pages to the network disk, as it makes trivial updates to .DS_Store files in the disk image. (Even worse, Microsoft Word likes to scribble on folders even if you are just looking.) Making random updates is not a good way to treat one's archives!

With the shadow-file mounting technique, when I browse archived images, the silly updates are posted to /tmp, and can be discarded properly. As a side benefit, there are fewer handshakes with the file server, so browsing and searching are faster.

I made a Finder plugin in Automator to put this mounting technique on the right button everywhere. (I only wish there were a way to get this behavior from a plain double click.) Here is the relevant shell code for the Automator action:


exec >> /tmp/mrolog.txt 2>&1
echo + date; date
for f in "$@"
do
	sf=$(basename "$f")
	[ -f /tmp/"$sf".shadow ] && sf=$sf-$$
	echo + 
	hdiutil attach "$f" -shadow /tmp/"$sf".shadow -noverify
	hdiutil attach "$f" -shadow /tmp/"$sf".shadow -noverify
done


[ Reply to This | # ]