Applescript在Mac OS X 10.9 Mavericks中触发Time Machine

1 applescript operating-system timemachine osx-mavericks

多年来我一直使用以下Applescript来从Applescript中触发Time Machine.它似乎不再适用于Mac OS X 10.9 Mavericks.任何人都知道解决方案或替代方案.此脚本运行并且不会抛出任何错误消息.它什么都不做.

do shell script "/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper >/dev/null 2>&1 &"
Run Code Online (Sandbox Code Playgroud)

Lri*_*Lri 5

您可以在10.7及更高版本中使用tmutil:

do shell script "tmutil startbackup"
Run Code Online (Sandbox Code Playgroud)

-b阻止脚本直到保存快照完成,所以你可以做类似的事情tmutil startbackup -b&&diskutil eject Time\ Machine.-a以与自动计划备份类似的模式执行备份.

startbackup [-a | --auto] [-b | --block] [-r | --rotation] [-d |
        --destination dest_id]
        Begin a backup if one is not already running.

        Options:
            --auto           Run the backup in a mode similar to system-
                             scheduled backups.
            --block          Wait (block) until the backup is finished
                             before exiting.
            --rotation       Allow automatic destination rotation during
                             the backup.
            --destination    Perform the backup to the destination corre-
                             sponding to the specified ID.

        The --auto option provides a supported mechanism with which to
        trigger "automatic-like" backups, similar to automatic backups
        that are scheduled by the system. While this is not identical to
        true system-scheduled backups, it provides custom schedulers the
        ability to achieve some (but not all) behavior normally exhibited
        when operating in automatic mode.
Run Code Online (Sandbox Code Playgroud)