Setting Up a Time Machine Drive from the Command Line
Introduction
It’s possible to set up Time Machine drives from the command line. This is way more convenient and becomes scriptable (there’s one GUI checkbox at the end if you encrypt, so the drive can unlock itself). Also, based on my own personal experience, the Time Machine GUI can be unresponsive so the CLI is much better.
I’ll be using a 1TB external SSD in this guide.
Here’s how you set up a drive.
Prerequisites
Some of these terminal commands require Full Disk Access. Specifically, the tmutil commands we’ll be using later on.
Grant your preferred terminal app full disk access in System Settings -> Privacy & Security -> Full Disk Access.
Identifying the Drive
Plug in your drive. Unlock it if you have to.
Run the following to get some information we’ll need.
Here is what you’ll see…
评论
?
参与讨论