Tech posts by aclassifier
Also see Designer's note page

You are at http://oyvteig.blogspot.com
Archive by month and about me: here
Last edit: 4Sept2015
Started move: September 2012
All updates at http://www.teigfam.net/oyvind/home/, but the overview is updated

Sunday, February 1, 2009

004 - Living with a network disk in the house

This note is updated at my new blog space only, blog note http://www.teigfam.net/oyvind/home/technology/050-sound-on-sound-and-picture/. Welcome there!

Intro

Updated 28Feb2012.

Chapters 1-8 (before Nov 2011)
Our network disk was connected to an Apple AirPort Extreme, version 7.3.2 (1Sept09: 7.4.1 (after 7.4.2 failure (*)) - but the problems below still exist), over its USB line, with no hub. Mac OS X Tiger 10.4.11 on this machine. In this post I will discuss aspects around having a network disk.
(*) If I ever get any of these problems after the update from 7.4.1 to 7.5.2 on Dec. 2010 (and Oct. 2011!) (where Apple seems to have done a version quantun leap) I will update here. If not, consider points closed. New: follow on 004.6 - Airport Extreme version juggling
Chapters 9-.. (after Nov 2011)
Apple Airport Extreme with external network disk over USB replaced by Apple Time Capsule with internal NAS disk.
Chapter 11. February 2012
11. File creation- and modification dates years ahead and synching with ChronoSync
1 - Disk write access lost

Today I ran iTunes (as we're getting used to now, against the network disk as described in the previous post) when iTunes said something like this: "Could not store the iTunes Library file. Unknown problem (-50)."

I thought that this was a multi-access problem, even if no of the other machines were on. Maybe they had left the file in as read-only? I checked the named file on the network disk: nope. I saw no problem with other files, either.

But when I tried to make a new directory on the network disk, I also got the (-50) error! Some access rights problem for the whole disk I soon learnt!

I started the Airport tool (5.3.2) and disconnected "all users", and disconnected the USB cable for some seconds and then connected again. Then I mounted the external disk again from this machine.

Problem gone!

Here is my recipe to reproduce this error (there may be others): My Tiger iBook is connected to the home network via cable. Airport is switched off. The network disk has, prior to this, been automatically mounted with the Apple Airport disk tool (1.5). I then unplug the cable, and Finder (or the disk tool using Finder?) spins around to eventually discover and tell me that the network disk connection is lost. During that waiting period I try to use the network disk, which is still to some extent visible in Finder - or it may have been that I plugged in the camera, which Image Capture did not see during that time. When I later plug in the cable and mount the network disk manually, write access to it is lost.

2 - iPhone crashed when iTunes got (-50)

Incidentally, my iPhone (2.2.1) was connected to iTunes when I got the (-50) error. To my surprise it crashed and restarted when I had an unacknowledged error (-50) window waiting for me. And it crashed again! And again!

I am not 100% positive that I have seen cause & effect correctly here, but until I see it again this would suffice.

Why did it start again without asking for the telephone pin code? I though this was strange, so I switched the iPhone nicely off and on again. Then it asked for the pin code.

There is a history to the iPhone here. It had, prior to this, restarted because I had received 8 MB of attachments in a mail, that I tried to delete while it was spinning to input.

When problem 004.A was solved I synchronized the iPhone. It now seems to run fine!

3 - Backup of the network disk

Observe that if you have a network disk, you are bad off if it dies on you. You only have that copy!

Observe that the longer a disk has been working fluently, the shorter it is till it fails!

There are several things you may do to soothe the situation, should this happen. Here I list what I do, there are a hundred different other ways to do it.

Pictures, f.ex. I synchronize between the network machines, so that at least one of them has a copy. I use ChronoSync on the Macs, and tells it to "Synchronize Deletions". This means that the network disk ends up with a directory ("archive") which effectively contains the old files, the garbage.

However, with a centralized iTunes library (see post 003) it's different. You would have only one copy. So you would need to mirror or backup or synchronize your network disk with yet another disk! And once you find out how to, this turns out to be A Good Thing for all your files.

Try having another disk, of equal size, to the network disk stored at a friend or neighbour or at work. In another house. Then you would be safe against burglars and fires, while the disks are separated - so make the period they are in the same house short. However, with this scheme there would be lag. Synchronize 4 times a year, and you would loose max 3 months. A combined scheme with local synchronized copies then helps you almost to 100%.

I use ChronoSync also for the backup copy of the network disk. I "synchronize" all of it - quoted because I only do it for that disk from the main to the backup - one way. Having snapshots of the whole disk, times 'n' soon fills up your backup. With synchronization, the backup proper is increased or decreased in size along with the original system. Only the garbage directory grows - but you could delete that "archive" whenever you want to.

Observe that backup of the bootable parts (with system files) of your machines is an altogether different story. And backup of programs as well. However - most of that stuff has not been generated by you, so it's very probable that it would be possible to recover them. I mean, Apple iWork or Microsoft Office you would find on the original DVDs.
On Mac, Time Machine would help me with all of the factors above. When I installed the network disk, the Mac OS X version Leopard asked me if I wanted to use that disk for Time Machine storage. It's very nice, but I declined. Since we we also have earlier Mac OS X versions (Tiger) on the network, and since the hand-scheme I use serves us well, I decided to decline. And I don't really need to recover my system 143 weeks ago - and would want that storage space to be used for my daily more or less linear increase.

A psychological question now seems quite appropriate: wouldn't it be good for mental health to actually have a broken disk once or twice in a life time? Or even more often? Why were we supplied with the ability to forget? One thing is certain, some times that is necessary, too. And the controlled version of a broken disk: to throw away. That, too, is a privilege - some times.

4 - Airport and cabled mounting of disk is not seemless ::

If I connect my Airport Extreme network disk by cabled connection, then unplug the cable with the Airport active on my Mac OS X 10.4.11 Tiger iBook, I get a long period when the cabled connection will time out. This makes the file system non-responsive for that period.

I would like the Airport to take over this connection dynamically. I have a mental connection to the network disk. The operating system should make it like this for me - and to the client programs. (It could, immediately ask me if I wanted to switch to Airport (or back to cabled), if a "finger" is thought necessary in the handling.)

Filed to http://www.apple.com/feedback/airportextreme.html on 29 July 2009.

5 - Time Machine backup on Airport Extreme's USB connected disk ::

This chapter is obsoleted with this fact: "Apple does not support Time Machine backups to a drive connected to an AEX". See http://discussions.apple.com/thread.jspa?messageID=12975885#12975885 (started chapter 6 below, date 23Jan11). I also updated with this info on Wikipedia: http://en.wikipedia.org/wiki/AirPort#AirPort_Disk
  1. 6Jan11:
  2. Mac OS X 10.6.5 Snow Leopard mac Mini
  3. Airport Extreme serial number 6F8390GLYEW version 7.4.1 (tried both 7.4.2 and 7.5.2)
  4. Using AirPort Tool 5.5.2 on Mac Mini
  5. Decided no to use corresponding AirPort Tool 5.4.2 from Tiger in fear of compatibility problems
  6. Network disk is Western Digital myBook 1TB type 0x11102 connect to USB on Airport Extreme
  7. 20Jan11: (see log in chapter 6)
  8. Airport Extreme 7.5.2 (75200.14 when I press the version number)
  9. 22Jan11: (see log in chapter 6)
  10. Airport Extreme 7.4.2 (74200.9 when I press the version number)
  11. Airport Extreme 7.4.1 (74100.25 when I press the version number)
Had several problems with destroyed Time Machine image on the network disk. Lost with Airport Extreme 7.4.1 once but when I changed to 7.5.2 I lost again almost immediately, so I went back to 7.4.1.

It is very bad to loose the Time Machine backup! With this experience it's not a good idea to use Time machine as an archive, only backup! I use ChronoSync for archive!

By intuition I though that I could try yo move the disk cable! When I connected the disk to Mac Mini, Time Machine allowed me to start all over on that disk. I didn't. But when I put it back to Airport, Time Machine could not see it. If found a recipe on MacWorld: Take the disk back to Mac Mini and run Disk Tool and let it verify and reapair. I did - and the disk had error! The Extended attributes file had wrong number of access control lists (4949 instead of 4952), whatever this means. I let Disk Tool repair it and plugged it back into Airport. Now Time Machine saw it, exactly like MacWorld had said!

I am now running Time Machine anew with the 6Jan11 versions, crossing my fingers.
.
6 - Airport Extreme version juggling ::

This chapter may be related to problems described in intro above, chapter 5 above, and to 020 - Mac OS X network disk partially seen. I will try not to repeat, but update new things here. However, there is much version and config info up there.

Summary
  1. OLD IS BEST: Airport Extreme old 7.4.1 seems more stable than 7.4.2. The newest 7.5.2 has crashed and restarted on some occasions ("much" traffic). Presently running 7.4.1
  2. REPAIR DISK: Network disk needed repair (why?). May this have been the cause of Time Machine backup lost? See chapter 5 above.
  3. MOUNTING: Mounting the network disk for iTunes on Snow Leopard must be done by "connect server", not double-clicking. See 020 referenced above.
  4. DUBIOUS: There may be a problem with different AirPort Tool client versions if I used them at the same time on different machines. Now only using the newest 5.5.2, on Snow Leopard. How about two of same versions up?
MyDiskAcidTest is that I press "New Folder" on my network disk. If unkown error (-50) then it failed, elso ok with a new directory!

Log (newest bottom short log in (see log in chapter 5))
  1. 6Jan11. Chapter 5 above done.
  2. 7Jan11. The Mac Mini is always on, never idle. But when I came back to it tonight, the network disk was gone (for the millionth time), and I had to unplug/plug it the Airport Extreme 7.4.1. I had not used any Airport tool in between. Time Machine had a compliant up that it had not been able to run the backup. But the two network disk icons were there, I was able to unmount and mount again ok. But MyDiskAcidTest failed.
  3. 8Jan11. Same problem as yesterday: Time Machine had failed and MyDiskAcidTest failed. Unplugged/plugged the USB cable in Airport Extreme, then ok. I decided to look further at the MyBook Home (WD10000H1CS-000) network disk.So I downloaded from Western Digital's page here. It really said to update from Tiger (10.4.x) or Leopard (10.5.x) but did not mention Snow Leopard (10.6.x). I chose Tiger (even if Snow Leopard probably would have been ok). Then I went into Activity Manager and killed two processes named WD_*, I could see that they were both some Western Digital button manager etc. But I did not write it down. I then ran Disk Tool and verified, and there appeared an error again! I fixed as with chapter 5 above. The Tiger Disk Tool said it fixed it but then summed up in red that it was unfixable! Anyhow, I then updated the MyBook Home with WD_MB_Home_1034 (1.03).app that had to be run from the downloaded image. The program said update was successful. I then ran Disk Tool again and now all was fine! I did not "Download and install the latest WD Drive Manager program" as in the recipe, as the disk appeared fine and passed MyDiskAcidTest. Another observation is that the disk needed repair even if I had stayed at Airport Extreme 7.4.1 and Airport tool 5.5.2 on Mac Mini all the time!
  4. 19Jan11. Still working (since 8Jan11), after almost a week! Time Machine works, iTunes runs continuously, and the Airport Extreme also runs!
  5. 20Jan11 - Time Machine stopped! However iTunes ok, MyDiskAcidTest, wifi ok! Remember that last time (8Jan11) MyDiskAcidTest did not work! So now only Time Machine stopped! So, updating the disk firmware may have helped? But Time Machine could show the files, I could restore - but it complained that it could not go on with the present data base after having verified it. So, if I now had trusted Time Machine, my 28 GB would have been lost! Now I try Airport Extreme old 7.5.2 again.
  6. 3 hours after. Wifi died! Easy to see on all equipment. But MyDiskAcidTest and wired network was fine. In my bewilderness I opened the AirPort Tool, and it showed green status. So I pressed the green "light", and it reported "no problems". After this, wifi came back. The physical LED had been green all the time.
  7. 22Jan11. Airport Extreme 7.5.2 restarted several times, I think during copying to the extern disk. Another thing I had noted was that the disk never spinned down, which it had done with 7.4.1! AndYellow and blinking yellow LED. "Initialized (7.5.2)" or something like that in log. I lost Wifi and wired ethernet, and internet. It crashes so much that I'll try 7.4.2 (not 7.4.1 again now). Time Machine and MyDiskAcidTest are ok when the router is up. But what happens with the Time Machine data base on the network disk if it fails during updates?
  8. 22Jan11. 7.4.2 just crashed almost immediately! Giving up, reverting to 7.4.1.
  9. CONCLUSION for now: going for 7.4.1, switching off Time Machine on the Mini, and will run it by hand. However, I will use ChronoSync for real backup work, since Time Machine with the network disk simply cannot be trusted. Also, will have to mount iTunes disk by hand, see Post 020. Will not throw away more time before Apple updates 7.5.2 to something that works. Updating the MyBook network disk firmware helped, see above - so it's not been a complete waste of time.
  10. 23Jan11 - yes, the network disk now does spin down again, within some minutes after last usage. 7.4.1 is best.
  11. 23Jan11 - reported this to http://www.apple.com/feedback/airportextreme.html with this text (minus links to here): "My conclusion is that Airport extreme 7.4.1 is the only present version that I can use. 7.4.2 or 7.5.2 will not work. Even with 7.4.1 I have to do Time Machine manually, so that I hopefully will not loose my backup. Even then I do ChronoSync backup to make sure, since Time machine cannot be trusted. iTunes with that network disk is now ok running continuously, as is general access from other machines - even if I have to mount iTunes' network disk by hand. And now the network disk spins down when it's not in use like it should. Airport extreme serial number 6F8390GLYEW. Before I updatde the firmware on the MyBook disk, also 7.4.1 was unstable."
  12. I also posted the same as a support discussion, see http://discussions.apple.com/thread.jspa?threadID=2730728&stqc=true. Maybe there is some help to get 7.5.2 up again?
  13. Have a look at this: "Apple does not support Time Machine backups to a drive connected to an AEX" (ref http://support.apple.com/kb/HT2421?viewlocale=en_US "Uses for the USB port of Time Capsule, AirPort Extreme, AirPort Express"). I replied in the post that "Another thing, if Apple does not support Time Machine on an Airport Extreme eXternal disk AEX - then why do they allow me to select it? And run the animal every hours for a week or three, let me extract files from it, until one day - bang!"
  14. 2Feb11 - Wifi stopped after 1.5 week! I had to restart the Airport Extreme (7.4.1, no use of Time Machine).
  15. 21June11 - trying 7.5.2 again. Just a temptation..
  16. 27June11 - reverting to 7.4.1 again. Same problems as described above. Any surrounding updates hadn't fixed the problems.
  17. Filed to http://www.apple.com/feedback/airportextreme.html on 27 June 2011.
7 - Backup of the network disk was only a partial backup! (Access problems) ::

The network disk (figure, see Post 019) I synch by hand with ChronoSync (Mac), so I may loose the disk at any time without loosing anything within a week or two. Even the iTunes library I do a one-way copy into one of the permanent machines.

To complete the backup regime I use a disk the same size as the network, located in another house, which spends its life unpowered inside a plastic box meant for the freezer. Two to three times a year I bring it home and mirror the running disk onto it. In the daytime, while I'm home.

Both are 1TB disks, so I don't want to copy over the network. I disconnect the USB of the local disk and connect directly to the Mac Mini. The external drive I connect to FireWire on the same.

However, I only now solved a problem where, what's happened is that I really didn't get an exact copy. I had tried to copy with Finder, but some problem had it stop. And Finder stops after an error report, which ChronoSync doesn't. So I have used ChronoSynch with Backup Left-to-Right or Blind Backup Left-to-Right, but it complained that I didn't have access right to some of the files (reading access right, even if it looks from the log like I had writing access right problem).

This must be because the directories have been created from any of the connected machines, while it stood as a network disk. Since the disks now were connected directly, I tried to change the access right recursively at the top level for the disk as a whole. There even was an Ignore access rights to this disk, but none of them solved my problem.

What worked for me (disclaimer: in perspective - don't do this - see quote below) was to set the access rights to each of the few top level directories, recursively on subdirectories. It took a while. To start afresh I formatted the destination disk. Now, copying the some hundred GB of data went like a dream! All came over, no files were lost (I hope!). It seemed to work fine when I reconnected the network disk to the Airport Extreme again. iTunes worked fine, Time Machine etc. And ChronoSync from the other machines with the network disk.

Quote from an e-mail from somebodey who knows better than me:
- What I do know is that a 'network' drive connected to an Airport Extreme acts as Network-Attached-Storage (NAS) and is managed by the AFP server built into the Airport Extreme. All files and folders created on the NAS volume have ownership, group membership, and read/write/execute permissions set by the Airport Extreme and AFP.
- Connecting that NAS drive locally to a mac can deliver unexpected results. If I were to attempt such an operation I would most certainly not change all the ownership, group membership, and read/write/execute permission recursively on the volume.
By the way, we also some times send the best pictures to family, a pleasant backup type! And wo don't use Dropbox or any other file hosting services yet. And music is here, no streaming yet.

8 - iTunes 10.4.1 and Snow Leopard 10.4.8 with destroyed files ::

(Oct 2011) -8084, -8072 etc. unknown error codes

I tried to iTunes-synch the the iPad with the picture library I now had had for years, on the network disk. It complained that it could not synch the pictures, that I did not have correct access rights for the some 450 last pictures. I tried again. Same problem. The iPad picture library was acomplete mess! Pictures in wrong folders etc. Then I decided to move the source library into the Mac Mini and observe how it failed.

One jpg file seemed to have an IPCT digest code that Mac OS or Finder or iTunes did not like(?). When I copied the group of files individually I got them across!

Then, some of the jpg files were unix executables from Snow Leopard, and not accepted by iTunes. But Tiger saw them as proper pictures and I saved them under new names, deleted the old (not allowed from Snow Leopard), and named back to original.

Finally I was able to get a clean 2804-numbered picture library that iTunes again synched!

I seem to experience increased problems with the Airport Extreme controlled MyBook disk. I don't know what to do.

How about a Time Capsule with built-in server grade disk? Will it come with Thunderbird? Hmm.

9. Moving from Airport Extreme to Time Capsule ::

See http://oyvteig.blogspot.com/2010/08/019-play-with-network-disk-based-itunes.html#fig2 for the figure.

There were several reasons for the move:
  1. A while now I have been running iTunes on the Intel Mac Mini, and its Time Machine backup software will not work correctly on the disk that I had connected to Airport Extreme [1]. Time Capsule is made for it. Apple "forced" me to buy an Apple product. As a programmer I know how complicated making things work across platforms is, but then I may be too forgivable.
  2. The Western Digital myBook external hard disk made too much noise when it at least once per minute seemed to be accessed. It didn't seem to spin down ever, especially not since I started to have iTunes always run (I didn't play all the time!). This may not be a blame on myBook, but I did't like it. Time Capsule spins down under the same circumstances. And I can't really hear it when it runs.
  3. I had updated the firmware on myBook, but in a way there was some problems left. The result seemed to be the "Airport Extreme version juggling" above. Now I run Time Capsule's latest firmware version. It seems to be ok.
  4. I had problems with access to myBook (read: Airport Extreme'sn USB connected hard disk) from iTunes (on Mac Mini with newest OS) and iBook running Tiger. Picture directories for iTunes synch had to be created from the Mini, but could be filled from Tiger. I also saw some files turning up as "unix binary" as seen from the Mini, but perfectly ok jpg from Tiger. I hope this will not be so with Time Capsule.
  5. Lots of pictures have turned up to have been created in 2013, some two years from now.
  6. Synching with ChronoSynch between the machines started to take time. I could see 8 minutes. Not it's under 2
I studied Time Capsule's supposed heat problems, but decided to try it. The place I mounted it, it has never become as hot as the Extreme, even if max dissipation is 34 Watt for the Capsule, some 13 Watt more then the Extreme. I mounted Capsule below all units, and it has freen air underneath, and is held by a solid aluminum bar, that I thought would help cooling. I have never hear it start its fan, which I think is there also at this version [2].

I think our internet connection has become faster. It feels like it, even if the service provider has not upgraded.


This chapter is not a recipe. Apple has the recipe [1].

But you might encounter problems. I did. I also did at least one thing wrong.

The new iTunes directory structure [2] is very clean, as opposed to the earlier. I wish I had looked at [2] and [1] again before this exercise. But when the iTunes config dialogue asked me to give the position of the new "iTunes Media" directory, I thought that since I had always there pointed to the iTunes base directory, that Apple now had decided that it should be called "iTunes Media". So I made the new position on the Time Capsule disk to be "iTunes Media". When iTunes had moved the files another "iTunes Media" directory had appeared underneath. It was empty. It started to smell.

Lesson one: the root iTunes directory is still "iTunes". When you want to tell iTunes of the new position, make this "iTunes" directory - and a directory called "iTunes Media" under it. Then, point iTunes to the latter! Observe that an "iTunes Music" directory is gone, it's now "Music" under "iTunes Media".

This is a change in the iTunes config dialogue box semantics that Apple did not get across to me! It would have been easy to either explain, or just let me point to "iTunes" and they could have added "iTunes Media" themselves.

This seemed to cause a lot of problems. But I had a backup copy of my complete iTunes system, which was nice. But before that, iTunes all of a sudden told me that my "iTunes Media" file complete path had a "-1" or "-2" in the part of the path that contained the name of the Time Capsule's internal disk name. Like, instead of "CAPSULEDISK" it would be "CAPSULEDISK-1" or "CAPSULEDISK-2". This was complete nonsense, and iTunes then could not find the place where it should find the files.

I did not fix this before I had started all over, with correct "iTunes Media" pointer, and the old data iTunes base files. Now iTunes moved over and placed all "media files" in subdirectories in "iTunes Media". Fine! After this I stopped iTunes. Moved data base files to just under "iTunes". Then started iTunes by holding down the command button. Fine! (According to [1] it seems like iTunes do move these files?)

Almost fine! But some of the files were not seen! I could not understand a thing, so I exported the library to a text file. I inspected it and searched for the old file position, like "MYBOOKDISK" for13 files that iTunes had told me were not there, when I tried to access them. I noticed that I could not open the directories they were in, because I didn't have access. The myBook disk was now not connected to the parked Airport Extreme, but to the Mac Mini. I changed access rights to them, and moved them to the new Time Capsule disk. I then (after lots of fiddling), I deleted them in iTunes, and imported them anew. Voila!

But iTunes hadn't said a thing! If I hadn't been so accurate and visited every song (open list mode and arrow down and don't expect and exclamation mark), my directory could have rot on root. Apple has chosen to inform when a song is accessed (playing or synching). But, I wonder what the reason is for not telling during moving?

Another thing, keep the "sentinel" file [3].

Reported to http://www.apple.com/feedback/itunesapp.html

[1] - iTunes for Mac: Moving your iTunes Media folder (Windows)

[2] - What is the default iTune Folder Structure for iTunes 10? (see graphics somewhat down)

[3] - What is the Sentinel File in the iTunes Directory?

Afterword

When I wanted to synch the pictures, iTunes failed for some reason. The pictures again should be on the external drive. I deleted the "iPod Photo Cache" directory and restarted. No help. After two hours of trial and not succed, I tried to move the last synched picture directory from the Mac Mini to the external drive. I also deleted "iPod Photo Cache" there. Only then did it complete the synch, with pictures on the iPad again. Please, Apple - say something understandable in a dialogue box when things fail!

I did get an "unknown error 1630" that iTunes "could not search for updates for operator configuration for iPad" (translated from "iTunes kunne ikke søke etter oppdateringer for operatørinnstillingene på iPad. Det oppsto en ukjent feil (1630)" in Norwegian.) I don't know how this should have influenced picture synching.

Analysing afterwards. I had made a copy of the whole Time Capsule picture directory, and now wanted to delete it. But there was one file that could not be deleted, since it was "used", Lion said. This was not so, it was a jpg having become a "unix binary" (see chapter 8 above). I saw that this was also present in the directory that iTunes had used to synch the pictures, but that "picture" was not synched, but the rest was ok. When I looked at the file from Tiger - this time it was also a binary. But as I did not succeed in deleting the file from Lion, I was from Tiger. I have no idea if this was the problem, but since iTunes did complete the synch, my guess is that this was not the problem.

11. File creation- and modification dates years ahead and synching with ChronoSync ::

I had seen files get creation dates and modification dates into the future. For perhaps a year, but synchings seems to have been ok, since I probably haven't modified much on these files. I have kept an eye on the results, but the other day I got an overwrite. I found the original in "_Archived Items".

A while ago I asked ChronoSync what I could do. They were not sure, but sent me this reference to some scripts: http://hints.macworld.com/article.php?story=20060703160750583. The script I ended up using, some half a year after, I think is based on one of those. I did some work on it back then. I have informed Econ Technologies support about my new endeavours here.

I have two Tiger machines and one Lion. I now have one Time Capsule. All updated to newest versions.

I have not synched many of these files with the machine that now runs Lion, which previously ran Snow Leopard and before that Leopard. But I have synched a lot between the Tiger machines. Always used ChronoSync with updated versions. The obsoleted Airport Extreme with MyBook disk connected over the USB port was updated once with new firmware. This blog tells a lot of that experience, which ended with Time Capsule. Almost any part of this chain could have garbled the file dates.

Here is how I was able to fix this. I now have no file from the future. Yesterday I had almost 10.000!
  1. In Tiger I did a spotlight search of jpg files at a given top-node directory. I took three different large directories, one per time. I have my corresponding three .synch files for the same.
  2. I added a search criterion of creation date after the next date. Lots of files appeared.
  3. I tested the script below, and saw that it worked on an individual file down in the directories somewhere. Creation and modification dates were now for today.
  4. I dragged all the files that were from the future into the script and waited. I could see spotlight update with less and less files. I had to take jpg, pdf etc. in chunks. Do observe that the jpg I started with at the top doesn't matter when you add a new search criterion.
  5. I added a search criterion of modifcation date after the next date. Lots of files appeared. I repeated as above.
  6. Then I synched with ChronoSynch, but important - I told it to to resolve conflict with "Use Left" instead of "Use Newer". Left is the machine I'm sitting at. After I had synched all, I set it back to "Use Newer" again.
  7. I checked again to see that all seemed fine. For some reason less that 5 files remained. So I took them over again. Ok.
  8. My aliases were not willing to be fixed. I just deleted them, as I really didn't like them. Search does it better than keeping alisases.
  9. I updated the other Tiger machine by first doing a hard move to the network disk, as a backup (of the backup (of..)), then just copied all from the synched directories on the network disk to that other Tiger machine. Then I set up new ChronoSync scripts for the next runs.
Here is the script I earlier had inserted into Mac OS X Script Editor and made an app of. It was commented that it did not work for files dragged and dropped onto it from the search window. But it did! (Test it first on one file and don't blame me if it does not work). When I once dropped some 5000 files on it, the script ran for some half an hour. But you may follow it in the search window, that the file number count decrements:

on open files_
set cnt to 0
display dialog "Start"
repeat with file_ in files_
tell application "Finder"
set file_ to POSIX path of file_
do shell script "touch " & quoted form of file_
set cnt to cnt + 1
end tell
end repeat
display dialog cnt
end open

I will update here should files creep into the future again.

I certainly would like this automated with ChronoSync. I'd like an - "If creation date or modification date is after now, then set both to now" - function!
.

No comments:

Post a Comment

Archive and about

Popular Posts

Øyvind Teig

My photo
Trondheim, Norway

All new blogs and new home page start at
http://www.teigfam.net/oyvind/home

Overview of old blog notes here

My technology blog was at
http://oyvteig.blogspot.com

and my handicraft blog was at
http://oyvteig-2.blogspot.com

PS: just call me "Oyvind"