1

I'm gonna keep this short and simple. I have a ~/.vim folder and ~/dotfiles/.vim folder (the ~/dotfiles/.vim was copied to ~/.vim). Yesterday I noticed that I had several files with weird permissions in the ~/dotfiles/.vim folder, that was originally in the ~/.vim folder. These are two of them from ls -l:

-rw-r--r--@ 1 root           staff    0 Aug 14 20:22 .vimrc.swo
-rw-r--r--@ 1 root           staff    0 Aug 14 20:22 .vimrc.swp

From this

$ xattr -l .vimrc.swo
com.apple.backupdelta.creationMarker: yes
inodeForCreationOriginal: 10315637

and this

$ xattr -l .vimrc.swp
com.apple.backupdelta.creationMarker: yes
inodeForCreationOriginal: 10315632

it appears that time machine has created som sort of backups of some files in ~/.vim (the Vundle.vim directory is another example created at the exact same time). Is this normal behaviour? If not, what might be the cause and how can I fix it?

  • You are probably seeing local backups. This is supposed to be a feature to capture snapshots when you are away from your TM backup disk, assuming you have a laptop, but there as with regular TM, it is a resource hog and will keep going until it fills the disk. Try following this article – AMR Aug 15 '15 at 14:24
  • But should they really be spread out on the Macintosh HD volume? Shouldn't they be on the mobilebackups volume? And why in just the dotfiles folder? – Mattias Aug 15 '15 at 14:27
  • Is /dotfiles/.vim symbolically linked? There may be something in the way you have established that directory that causes TM to misbehave, or you did nothing wrong and TM is just misbehaving on its own. Unless it is really important to you to have TM create snapshots to your local drive, I would turn the function off. Actually I have turned the function off as I try to keep my local boot disk to an absolute minimum and use removable flash storage for most data. – AMR Aug 15 '15 at 14:42
  • The only real benefit of mobile backups to the same drive as the source of the backup is for versioning, and you are likely better off using a more efficient versioning control solution such as Git if you need to version control your files. – AMR Aug 15 '15 at 14:44
  • /dotfiles/.vim is not symbolic linked. I got it with git clone. Idk if you have heard of mathiasbynens dotfiles but that's where I got it from. But maybe I should just turn it off then I guess... It's a bit annoying though that I might have weird files laying around in Macintosh HD volume though. – Mattias Aug 15 '15 at 14:48
1

This seems harmless to me. If you want to clean things up, I would sudo tmutil disablelocal to clean up any local snapshots and then make a new test user and turn off automatic user log in.

Reboot and log in as test and make a clean backup interval without your user being logged in or any files open from the main ~ directory.

At that point, you can check for any odd files or delete them entirely (sudo -s from the test user to become root and able to delete things in your normal user folder).

Again, I don't think any of this will cause issues, but it might be nice to clean things up as described and have a known good backup interval where all files are properly closed and backed up once. Handling files that are always open or always changing is hard for backup tools - so excluding them by rule is also an option.

tmutil isexcluded

tmutil addexclusion file1 file2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .