• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: using FSevents for backup - is it reliable enough?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using FSevents for backup - is it reliable enough?


  • Subject: Re: using FSevents for backup - is it reliable enough?
  • From: James Bucanek <email@hidden>
  • Date: Thu, 13 Jan 2011 14:31:46 -0700

Alan Snyder <mailto:email@hidden> wrote (Tuesday, January 11, 2011 5:43 PM -0800):

... I can demonstrate one (perhaps pathological) case where Time Machine fails to back up a file.

Alan originally contacted me about this issue, and I can now confirm that the scenario he described is a pretty serious problem.


Here's the experiment:

Create a file:

 $ cd ~/Desktop/Test/
 $ mkdir -p a/b/c/d/e
 $ touch a/b/c/d/e/file1

Note the last event number in the FSEvent stream, as though a backup had been performed.

Now modify the file and change the intermediate path to that file:

 $ mv a x
 $ touch x/b/c/d/e/file1
 $ mv x a

The FSEvent for the modified file now refers to a path that no longer exist:

2011-01-13 11:59:29.060 FSOldEvents[855:903] starting from file system event ID 7162257434876738819 for device e000002

2011-01-13 11:59:29.062 FSOldEvents[855:903] -[FSOldEventsController _event:path:identifier:] event=7162257434876738892 flags=0000 path=Users/james/Desktop/Test/x/b/c/d/e/

2011-01-13 11:59:29.063 FSOldEvents[855:903] -[FSOldEventsController _event:path:identifier:] event=7162257434876738896 flags=0000 path=Users/james/Desktop/Test/

2011-01-13 11:59:29.064 FSOldEvents[855:903] -[FSOldEventsController _event:path:identifier:] event=7162257434876738896 flags=0010 path=Users/james/Desktop

2011-01-13 11:59:29.064 FSOldEvents[855:903] -[FSOldEventsController _event:path:identifier:] event 7162257434876738896 marks the end of the historical events, lastID was 7162257434876738896

The only event of any relevance is Users/james/Desktop/Test/, but since none of the items name or modifications in Test have changed since the previous "backup", nothing gets backed up. The change to ./a/b/c/d/e/file1 goes undetected, indefinitely.

I'm going to file a bug report, along with this example and the test application I used. I feel this is a pretty serious problem and might explain similar FSEvents bugs I reported a couple of months ago.

I'm actually rather surprised this is happening. When I talked to an Apple Engineer at the time when Time Machine was introduced (WWDC 2006?), I though they said that the FSEvents were tracked using the nodeID of the modified directory, not its path. So the path reported in the historic event stream should be the path of the modified folder as it exists now (i.e. Users/james/Desktop/Test/a/b/c/d/e/), not its path when it was modified (i.e. not Users/james/Desktop/Test/x/b/c/d/e/).
--
James Bucanek


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: using FSevents for backup - is it reliable enough?
      • From: Dominic Giampaolo <email@hidden>
References: 
 >using FSevents for backup - is it reliable enough? (From: Alan Snyder <email@hidden>)

  • Prev by Date: Re: How to restore /var/db/dyld cache?
  • Next by Date: Re: using FSevents for backup - is it reliable enough?
  • Previous by thread: using FSevents for backup - is it reliable enough?
  • Next by thread: Re: using FSevents for backup - is it reliable enough?
  • Index(es):
    • Date
    • Thread