How to INCREASE the Frequency of Time Machine Backups

Yes, I’ve read about TimeMachineEditor but it does NOT support making backups MORE frequently than once an hour.


Is it possible to use terminal commands to set the frequency to less than 3600 seconds?


Thank you.

iMac 27″, macOS 12.3

Posted on Mar 18, 2022 2:07 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 19, 2022 10:38 AM

steve626 wrote:

You can always manually select Back Up Now from the Time Machine menu icon at the top of your screen.


Yes, I suppose that I could use Automator or AppleScript to trigger an immediate backup based on a timer.


There’s a nice Automator example in Time Machine Backup frequency - Apple Community:


Open Automator
Click on Calendar Alarm for the type of automation you want
Click the Record button (red circle at top left of window
Perform the 3 following actions
      Click on the Time Machine icon on the header bar
      Click on Backup Now
      Click on the Time Machine icon on the header bar (necessary to stop the automation)
Click on the Stop button on the recorder
You can now look at what you've created, the three lines describe exactly what you just did.
You can even Run it if you want to see how it works if you'd like.
Next, Click File>Save
Give it a name
Calendar will open and the Alarm will be inserted into your calendar at the current time.
Edit the Calendar event to your purposes (I used run 11:58-11:59 PM, every day, Never end)
Done!



A post in macrumors.com contains this line of AppleScript to initiate a Time Machine backup:


do shell script "/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper"



However, I was hoping that I could use a terminal command to change a parameter in the macOS scheduler instead of writing my own scheduler.

6 replies
Question marked as Top-ranking reply

Mar 19, 2022 10:38 AM in response to steve626

steve626 wrote:

You can always manually select Back Up Now from the Time Machine menu icon at the top of your screen.


Yes, I suppose that I could use Automator or AppleScript to trigger an immediate backup based on a timer.


There’s a nice Automator example in Time Machine Backup frequency - Apple Community:


Open Automator
Click on Calendar Alarm for the type of automation you want
Click the Record button (red circle at top left of window
Perform the 3 following actions
      Click on the Time Machine icon on the header bar
      Click on Backup Now
      Click on the Time Machine icon on the header bar (necessary to stop the automation)
Click on the Stop button on the recorder
You can now look at what you've created, the three lines describe exactly what you just did.
You can even Run it if you want to see how it works if you'd like.
Next, Click File>Save
Give it a name
Calendar will open and the Alarm will be inserted into your calendar at the current time.
Edit the Calendar event to your purposes (I used run 11:58-11:59 PM, every day, Never end)
Done!



A post in macrumors.com contains this line of AppleScript to initiate a Time Machine backup:


do shell script "/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper"



However, I was hoping that I could use a terminal command to change a parameter in the macOS scheduler instead of writing my own scheduler.

Mar 18, 2022 6:38 PM in response to Nello Lucchesi

FWIW. Since macOS High Sierra, Time Machine (TM) relies on DAS (Duet Activity Scheduler) to determine when to make a backup. Without going into a lot of detail, DAS "scores" over 200 activities on your Mac with TM being one of them. I believe if you use one of the third-party Time Machine "schedulers" it will reprioritize the TM task under DAS, which has the effect of running it sooner. My concern is that I believe in the long run that this may cause potential corruption in those backups and should be avoided.


However, there are at least three methods to change this interval. You may find that neither of the first two methods will work with macOS Monterey's built-in additional security. Sorry, I don't have a Mac, running Monterey handy, to check.


Method 1 - Via the Finder App

  • Open Finder, and navigate to System/Library/LaunchDaemons
  • Find com.apple.backup-auto.plist, and copy it to the Desktop (in case you want to return back to the default hourly backups)
  • Open the plist file in TextEdit and find the StartInterval key. It has a default value of 3600. This value is in seconds.
  • Change the value to your desired interval.
  • Save the plist file. 


Method 2 - Via the Terminal

  • Open a Terminal session
  • Enter sudo defaults write /System/Library/LaunchDaemons/com.apple.backup-auto StartInterval -int 3600, and then, press <Enter> (Note: Change the value 3600 to the desired backup interval.)


Method 3 - Using third-party software

As leroydouglas has eluded to there are a number of third-party apps you can try. However, it looks like you already have tried one of them without success.


Mar 19, 2022 11:34 AM in response to Tesserax

Tesserax wrote:
Enter sudo defaults write /System/Library/LaunchDaemons/com.apple.backup-auto StartInterval -int 3600• , and then, press <Enter> (Note: Change the value 3600 to the desired backup interval.)


Yes, excellent!


I found your command marked as a “solution” on a StackExchange post. Apparently a restart is required for this change to take effect. If I’m reading this post correctly, apparently this answer is from 2012 but there is another answer from 2014 saying that the keyword apparently changed to BackupInterval in macOS 10.8; do you know which is the correct keyword for macOS Monterey (12.2), StartInterval or BackupInterval?


Later in the post, there is an answer from 2014 which says that “With OS X Mavericks, Apple changed the scheduling of background tasks to be managed by XPC Services, so instructions for earlier versions of OS X no longer work.” This 2014 answer offers this command instead:


sudo /usr/libexec/PlistBuddy -c 'set :LaunchEvents:com.apple.xpc.activity:com.apple.backupd-auto:Interval 10800' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist


Can you tell me which command works with macOS Monterey (12.2)?


Finally, do you know whether there are ANY constraints on the values for StartInterval (or BackupInterval or Interval, as the case may be)? This article about Time Machine running on Sierra seems to suggest that the interval can NOT be less than (10 minutes x 60 seconds/minute =) 600:


When CTS [Centralised Task Scheduling] is told to run backupd-auto, it first checks when it was last run. If it is being asked to initiate a backup within ten minutes of the last, it will abort the instruction from DAS [Duet Activity Scheduler]; otherwise it will proceed with running backupd-auto.


Is this true?



Mar 18, 2022 7:43 PM in response to Nello Lucchesi

My philosophy is to not make intrusive changes to files used by the OS as eventually, when there is an update or upgrade, the modified file might not work properly.


You can always manually select Back Up Now from the Time Machine menu icon at the top of your screen. You can do that anytime you have made any changes to files that you want updated in your backups. You don't need to touch any files used by the MacOS to do this.


The downside is that as your Time Machine backup drive fills up with the more frequent backups, it will delete more of the older backups to make space. So your backups will be more frequent but won't go back as far in time. It's a trade off. It sounds like you would prefer more frequent backups.

Mar 18, 2022 5:42 PM in response to Nello Lucchesi

Nello Lucchesi wrote:

Yes, I’ve read about TimeMachineEditor but it does NOT support making backups MORE frequently than once an hour.

Is it possible to use terminal commands to set the frequency to less than 3600 seconds?

Thank you.


Local snapshots are saved...


Apps like Textedit , Pages, etc have a "Revert To" option from the drop down menu, this requires no user interaction. Local snapshots are saved 24 hours.. then moved to your external drive hourly or when ever you plug it in next







If you need more than that, look at the App Store for third management:







You can read more:

About Time Machine local snapshots on Mac - Apple Support


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to INCREASE the Frequency of Time Machine Backups

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.