Programatically disable TimeMachine & Spotlight agents

  • Hello,

    I can't find anything on this in the documentation or in the list
    archives:

    Is it possible to temporarily disable TimeMachine and Spotlight?

    Background: I'm doing multitrack audio recording in one of my
    applications. During the recording process the hard disk (and the CPU)
    is obviously quite busy.
    To avoid performance problems I'd like to disable TimeMachine
    temporarily as long my application records to prevent the system to
    start it's backup cycle in the middle of my recording session.
    Besides the additional work load on the hard disk and CPU, the backup
    process also produces a lot of noise when accessing the hard disks
    which might be disturbing in a live recording situation.
    Same thing with the indexing process of Spotlight. Although this one
    doesn't occur as often as the hourly TimeMachine backup (once a day as
    far as I know?), it would be nice to disable it also.

    Maybe a good solution would be some kind of
    "DoNotBackupWithinTheNext5Minutes" function or something like this.
    One could call this once in a while during critical processes
    (recording in my case) and in case of an application crash (or
    something else which prevents the app from "re-enabling" the backups)
    TimeMachine automatically resumes its work after 5 minutes (or
    whatever the timeout would be).

    Cheers
    Eberhard

    --
    Eberhard Rensch
    Pleasant Software
    Offenburg, Germany
    email: <mail...>
    http://www.pleasantsoftware.com
  • On 13 Nov 2007, at 14:55, Pleasant Software for the People wrote:

    > Hello,
    >
    > I can't find anything on this in the documentation or in the list
    > archives:
    >
    > Is it possible to temporarily disable TimeMachine and Spotlight?
    >
    > Background: I'm doing multitrack audio recording in one of my
    > applications. During the recording process the hard disk (and the
    > CPU) is obviously quite busy.
    > To avoid performance problems I'd like to disable TimeMachine
    > temporarily as long my application records to prevent the system to
    > start it's backup cycle in the middle of my recording session.
    > Besides the additional work load on the hard disk and CPU, the
    > backup process also produces a lot of noise when accessing the hard
    > disks which might be disturbing in a live recording situation.
    > Same thing with the indexing process of Spotlight. Although this one
    > doesn't occur as often as the hourly TimeMachine backup (once a day
    > as far as I know?), it would be nice to disable it also.

    I have no idea about if you can disable either of these. But I feel I
    should point out that Spotlight does not carry out its indexing once a
    day. The index is updated in realtime as the files on disk change.
    >
    >
    > Maybe a good solution would be some kind of
    > "DoNotBackupWithinTheNext5Minutes" function or something like this.
    > One could call this once in a while during critical processes
    > (recording in my case) and in case of an application crash (or
    > something else which prevents the app from "re-enabling" the
    > backups) TimeMachine automatically resumes its work after 5 minutes
    > (or whatever the timeout would be).
    >
    > Cheers
    > Eberhard
    >
    > --
    > Eberhard Rensch
    > Pleasant Software
    > Offenburg, Germany
    > email: <mail...>
    > http://www.pleasantsoftware.com
  • On 13 Nov 2007, at 15:55, Pleasant Software for the People wrote:

    > To avoid performance problems I'd like to disable TimeMachine
    > temporarily as long my application records to prevent the system to
    > start it's backup cycle in the middle of my recording session.

    Did you take a look at: CSBackupSetItemExcluded()? You could set it
    (using admin privileges) for all the volumes currently mounted and
    then TimeMachine should have nothing to do.

    Annard
  • On 14/11/2007, Pleasant Software for the People
    <mail...> wrote:
    > Hello,
    >
    > I can't find anything on this in the documentation or in the list
    > archives:
    >
    > Is it possible to temporarily disable TimeMachine and Spotlight?
    >

    You can stop Spotlight from continually indexing your files while
    recording, by putting them somewhere (or naming them) that Spotlight
    will ignore:

    <http://developer.apple.com/qa/qa2006/qa1497.html>
    (See the 'Spotlight' section)

    As mentioned, CSBackupSetItemExcluded, looks like it will work if you
    flag your files with it.

    I don't think you'll need to disable it for all mounted volumes, as
    I'd think your problem would be Spotlight/Time Machine continually
    trying to index/backup your files.
    If you do need to disable it entirely, you should probably instruct
    the user to do it, rather than flick it on/off behind their back.

    -Phil
  • On 11/13/07, <ab_lists...> <ab_lists...> wrote:
    >
    > On 13 Nov 2007, at 15:55, Pleasant Software for the People wrote:
    >
    >> To avoid performance problems I'd like to disable TimeMachine
    >> temporarily as long my application records to prevent the system to
    >> start it's backup cycle in the middle of my recording session.
    >
    > Did you take a look at: CSBackupSetItemExcluded()? You could set it
    > (using admin privileges) for all the volumes currently mounted and
    > then TimeMachine should have nothing to do.

    It also may cause TM to prune backups of those volumes... which isn't
    likely what a user wants.

    -Shawn
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today