top | item 21181065

(no title)

phillipamann | 6 years ago

What do you do if you lose your data and have to start over? As far as I know, there is no way to automate the settings of all of these macOS apps that don't have config files that can be backed up like VSCode. Do you use Time Machine?

discuss

order

rovr138|6 years ago

They all have to be saved somewhere. A lot of Mac only apps also use the defaults[0] system which allows you to read/write values there.

  man defaults
  defaults domains | tr " " "\n"
  defaults read com.apple.Safari
For dot files, I personally use stow[1] but there are other utilities and workflows out there[2].

  [0] https://ss64.com/osx/defaults.html
  [1] https://www.gnu.org/software/stow/
  [2] https://dotfiles.github.io/

draebek|6 years ago

Note that, at least as of 10.14 (Mojave), lots of built-in macOS preferences do not like their settings to be changed this way. For example, you can use `defaults` to change preferences for the trackpad to your heart's content, but they won't take effect immediately because IOKit (I think) has a shadow copy of the preferences that is much harder to modify. The pref pane for the trackpad ends up changing both the plist and the IOKit prefs to make preference changes take effect immediately.

If you use a lot of `defaults` commands, you'll want to reboot immediately afterwards.

mettamage|6 years ago

I'm still forming my backup strategy. In your particular usecase, it's a bit clunky, but I'd use Carbon Copy Cloner for Mac and make monthly backups.

heyoni|6 years ago

Personally I just do time machine over the air. You just need to setup a Netatalk server with mdns on a raspberry pi or any other spare computer and that’s it.

Now I’m trying to sort out how to push backups over vpn since it’s not identifying the drive correctly, but when I’m home it’s flawless.

nikivi|6 years ago

https://wiki.nikitavoloboev.xyz/backups

I back it up to Backblaze every 80 hours. And I am slowly moving my config files to Nix.

phillipamann|6 years ago

I will elaborate a bit more. You've taken the time to have this macOS set up configured exactly to your liking. All of these apps have settings and application data. Sometimes the application data and settings are synchronized in the cloud and sometimes they aren't. Maybe you use an app like Notes which has application data (your notes) that is synced to iCloud but application settings which reside somewhere on the computer locally. How do you handle situations like this? Do your back up solutions essentially allow you to back up the complete state of your computer so that if something happens you can restore it back to to the exact state you left it? What about upgrading macOS versions?

This is a puzzle I've struggled with both on macOS and iOS.

egze|6 years ago

draebek|6 years ago

FWIW I tried Mackup for a few days to try and sync prefs between two macOS machines, and it broke more than it fixed. Many applications don't like having their preferences files symlinked or preferences changed while they're running.