Hacker News new | ask | show | jobs
by phillipamann 2440 days 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?
5 comments

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/
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.

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.
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.

https://wiki.nikitavoloboev.xyz/backups

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

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.

You might find this app useful. I plan to use it as I move to a new mac soon.

https://github.com/zenangst/Syncalicious

Yes! Thank you! I'll even see if I can help contribute.

Does iCloud iOS backup accomplish an exact sync for iPhone and iOS? I've never used it so I am not sure. If I use iCloud backup and I lose my phone, will an iCloud backup restore bring my phone back to exactly what it was like before?

Almost.

Some things (e.g. Photo library tagging) doesn't get included in the backup, and all your photos need to be re-processed by the new device.

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.