2

I store my files (plaintext) on an encrypted Sparse Bundle Disk Image and backup this image (the ciphertext) with Rsync to another server. Sparse Bundle Disk Images create 8 MiB files ("bands") to store the ciphertext.

The problem is: just opening files or doing minor things like a rename or small edit will cause several changes on the HFS filesystem like:

When sparse bundle translates this into the bands, this causes large backup deltas, which is undesirable.

Can I configure this image to disable .DS_store, Spotlight and other metadata which is burdening my backup system?

William Entriken
  • 2,224
  • 5
  • 27
  • 39

2 Answers2

1

Here is one part:

touch /Volumes/THEVOLUME/.metadata_never_index

From https://apple.stackexchange.com/questions/136191/prevent-spotlight-from-indexing-future-hard-drives

This only solves part of it. Making community wiki to allow other additions.

Other potential stuff is here

https://apple.stackexchange.com/questions/6707/how-to-stop-os-x-from-writing-spotlight-and-trash-files-to-memory-cards-and-usb

William Entriken
  • 2,224
  • 5
  • 27
  • 39
0

I would recommend to achieve the goal by just excluding unnecessary files. Example:

rsync -ahPruvz --exclude=Thumbs.db --exclude='target/' --exclude='/home/*/.cache/' --exclude='/home/*/Downloads/' A B

Thumbs.db is the common garbage file you mentioned. target/ is a common output directory for build tools (java,rust etc). .cache is a common place to store cache files, which often do not need to be backed up. And so on, just mention the files that annoy you. You will see your diff if you run verbose rsync twice.

While this may not feel like an ideal solution, it does work on practice. The diff for the garbage files goes generally down to < 1 Mb after cleaning the most fat files.

VasyaNovikov
  • 3,366
  • 3
  • 25
  • 33
  • 1
    Thank you, but you are talking about not putting the files on the disk image. The problem is these files are created automatically by Mac OS X, so this answer does not apply. I have updated the answer to make this more clear. FYI, a good excludes list is at https://github.com/github/gitignore/blob/master/Global/OSX.gitignore – William Entriken Nov 24 '15 at 02:49
  • Ah. So as I understood it, it's a "Disk Utility" program limitation. https://en.wikipedia.org/wiki/Disk_Utility – VasyaNovikov Nov 24 '15 at 08:50
  • Talking about your goals rather than a proposed solution - maybe `rsnapshot` is a tool you might want to look at. Properties of this backup solution: 1. it keeps records of all states of your files [that you make]. So, if you made one backup 10 months ago and one backup a week ago - you'll have direct access to both. 2. Backup size grows slowly. Only new files are eating the space. (Internally, everything else is hard links.) – VasyaNovikov Nov 24 '15 at 09:08
  • 3. You have simple access to all data. It's just files on a filesystem. 4. Encryption may have some limitations. You should do it at filesystem level. Like a server considered secure, or a dedicated encrypted partition on external hard drive. – VasyaNovikov Nov 24 '15 at 09:08