I can use Disk Utility to create an encrypted partition, intended for Time Machine backups. I would choose the Mac OS X Extended (Journaled, Encrypted) format.
However is there also away to achieve the same from the command line, using the diskutil
or gpt
command, or something else perhaps?
I know how to manually create partitions with either, I just don't know how to get the exact combination of Mac OS X Extended (Journaled, Encrypted) as the Disk Utility App does.
Best Answer
Below (in the steps 1-5) I assume you already formatted some device as JHFS+ volume with an arbitrary name (in my example I use TMBackup). If you have an unformatted/unpartitioned disk, you have to partition & format it to JHFS+ first:
or (if the disk is already GPT-partitioned with one volume):
The content of diskX(sY) will be deleted.
Get the devices list:
Example:
Choose the future backup drive partition and convert it to CoreStorage:
Example result:
Encrypt the logical volume (LV)
Example:
Set destination device for Time Machine backups:
Example:
Enable Time Machine