title: Shell command to change macOS Time Machine update rate
body: <p>After seeing <a href="https://github.com/mathiasbynens/dotfiles/blob/master/.macos" rel="nofollow noreferrer">mathiasbynens' dotfiles</a>, I've decided that I want to start building a script to configure all my system preferences to my liking.</p>
  
  <p>As part of this, I need to decrease the Time Machine update rate (in order to reduce wear levels on my NAS' hard disk).</p>
  
  <p>After doing some reading online [1], I have concluded that the file I need to edit is <code>/System/Library/LaunchDaemons/com.apple.backupd-helper.plist</code>.</p>
  
  <p>I know that this is possible via the <code>defaults</code> command. Here is the section of the file I want to change:</p>
  
  <pre><code>$ defaults read /System/Library/LaunchDaemons/com.apple.backupd-helper LaunchEvents
  {
      "com.apple.xpc.activity" =     {
          "com.apple.backupd-auto" =         {
              AllowBattery = 1;
              Delay = 3600;
              GracePeriod = 1800;
              Interval = 3600;
              PowerNap = 1;
              Priority = Utility;
              Repeating = 1;
          };
      };
  }
  </code></pre>
  
  <p>The problem is that, due to the dots (<code>.</code>) in the path to the <code>Delay</code> property, I cannot figure out how to specify said path directly.</p>
  
  <p>I have tried <code>LaunchEvents.\"com.apple.xpc.activity\"</code>, <code>'LaunchEvents."com.apple.xpc.activity"'</code>, and many variations thereof.</p>
  
  <p>[1] <a href="https://staff.eecis.udel.edu/docs/timemachine/frequency/" rel="nofollow noreferrer">https://staff.eecis.udel.edu/docs/timemachine/frequency/</a></p>