Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

halloleo

macrumors newbie
Original poster
Dec 1, 2021
26
1
In order to restore from a Time Machine backup via the command line I can use tmutil with the restore verb like

tmutil restore /Volumes/TMdrive/Backups.backupdb/mymachine/2021-11-30-042315/MyHD /Volumes/New-HD

One the I could not figure out is what exactly the -v option here does. With the option I would write

tmutil restore -v ...

tmutil's manpage lists -v as an option, but doesn't detail what the option does.

I have noticed that -v gives me lots of log-like output, but I'm not sure whether it is just is a verbosity flag.

Does anybody know more?

ps: I'm on Mojave 10.14.6, if that makes a difference...
 

bogdanw

macrumors 603
Mar 10, 2009
5,700
2,734
It probably is -v for verbose.
The other mention for -v is at addexclusion [-pv] item “The -p option configures fixed-path exclusions. The -v option configures volume exclusions. Both require root and Full Disk Access privileges. The -v option is the only supported way to exclude or unexclude a volume; behavior is undefined if a sticky or fixed-path exclusion is specified.”
The manual page can be read from Terminal with man tmutil and can be saved as text with something like man tmutil >> ~/Desktop/manTmutil.txt
 

BrianBaughn

macrumors G3
Feb 13, 2011
9,647
2,416
Baltimore, Maryland
restore [-v] src ... dst
Restore the item src, which is inside a snapshot, to the location dst. The dst argument mimics
the destination path semantics of the cp tool. You may provide multiple source paths to
restore. The last path argument must be a destination.

When using the restore verb, tmutil behaves largely like Finder. Custom Time Machine metadata
(extended security and other) will be removed from the restored data, and other metadata will
be preserved.

Root privileges are not strictly required to perform restores, but tmutil does no permissions
preflighting to determine your ability to restore src or its descendants. Therefore, depending
on what you're restoring, you may need root privileges to perform the restore, and you should
know this ahead of time. This is the same behavior you would encounter with other copy tools
such as cp or ditto. When restoring with tmutil as root, ownership of the restored items will
match the state of the items in the backup.
This is from the link I provided.
 

bogdanw

macrumors 603
Mar 10, 2009
5,700
2,734
This is from the link I provided.
It’s the same link that halloleo provided in the first post.
It doesn’t say what -v does.
Man pages can be different for different versions of the OS, hence running man form Terminal gets the correct manual for the macOS version.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.