Controll TimeMachine from terminal
You can enable sudo tmutil enable
or disable sudo tmutil disable
from command line. If you want to run a Time
Machine backup right away, just run tmutil startbackup
or
tmutil stopbackup
if you ever want to stop a backup.
Local snapshots
Follow command will disable and delete “local snapshots”:
sudo tmutil disablelocal
You can turn local snapshots back on by running:
sudo tmutil enablelocal
Exclude selected folders
sudo tmutil addexclusion ~/Downloads
There is interesting property -p
that controls whether or not folder remains in exclusion when is moved.
If you use the above command with the -p
flag, then it will not be sticky.
If you are developer there is few quite common folders that should be excluded:
sudo tmutil addexclusion ~/.composersudo tmutil addexclusion ~/.npmsudo tmutil addexclusion ~/Library/Developersudo tmutil addexclusion ~/Library/Containers/com.docker.docker/Data/
List excluded
sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"
Get Time Machine stats
tmutil listbackups