Data backup on macOS (Time machine)

edited 11 days ago
I’m using Time Machine on macOS to back up my system.

The problem is that when I make even the slightest modification to my Zotero library, the sqlite database is modified and becomes a target for the TM backup. Similarly, the zotero.sqlite.bak file and the other backup files become backup targets.

The problem is that the sqlite files are currently about 600 MB and growing, so every time I modify even a note, I end up having to back up more than 1 GB of data. . .

So, the questions are
- Do I need to back up the sqlite files to restore my data in case of trouble?
- What is a safe and minimalist backup strategy for macOS (or generally speaking)?
  • The problem is that the sqlite files are currently about 600 MB and growing, so every time I modify even a note, I end up having to back up more than 1 GB of data.
    That's not necessarily the case anymore. If you use APFS for your main disk and your Time Machine disk, Time Machine should copy only changed blocks. (Apple doesn't talk about this beyond saying that Time Machine with APFS now makes "faster, more compact, and more reliable backups", but someone has done a deep dive and determined that it's now using APFS snapshots and block-level copying.)
    Do I need to back up the sqlite files to restore my data in case of trouble?
    It depends. You can of course rely on Zotero syncing — plenty of people move their Zotero data to a new computer just by setting up syncing and pulling down their library.

    But for a proper independent backup, as well as for historical backups, you'd want to back up zotero.sqlite on your own.

    If you're using a tool like Time Machine that already makes historical backups, you could reasonably exclude the automatic backups (*.bak) makes in the data directory. Those backups are currently created from within Zotero, so even if Time Machine + APFS is copying changed blocks, those would probably be entirely new files each time. For Zotero 7.1, we'll look into creating those with cp -c on macOS to make copy-on-write copies, which would likely allow Time Machine to back them up instantaneously.
    What is a safe and minimalist backup strategy for macOS (or generally speaking)?
    Make sure your Time Machine disk is formatted as APFS and don't worry about it beyond that.
  • Thank you. I was not aware of the granular backup authorized by APFS.
Sign In or Register to comment.