4

I'm backing up directories on a Fedora machine onto an NTFS drive (fuseblk according to df -T) and it seems to go just fine with this:

ls -t | sed -e "1,"$n"d" | xargs -d '\n' rm -rf

nice rsync -azv \
--link-dest=$DestDir/current \
--delete \
--delete-excluded \
$SrcDirs $DestDir/incomplete_backup-$Date

mv $DestDir/incomplete-backup-$Data $DestDir/Backup-$Date
rm -f $DesDir/current
ln -s $DestDir/Backup-$Data $DestDir/current

This gives me nice rolling backups and I can limit how many historical versions I have with the n variable.

What I notice is that if I execute the backup twice within a few seconds, I get a very long list of modified files. Exploring further with the -i switch, I see that all the files are flagged as having permissions changes. If I specify --no-perms, this fixes the problem. Assuming it is actually a problem.

My questions are: Why are permissions not being preserved? Does this situation negate my rolling backup concept? Any other details I should be considering?

  • Are you sure that --link-dest even works on NTFS? Perhaps it has been updated, but last time I looked the fuse driver didn't support hardlinks for ntfs. – Zoredache Feb 14 '14 at 0:52
  • @Zoerdache - excellent question and clearly of interest. I may simply reformat to ext4 as tink suggested below, but I would be interested to know the answer to hardlinks on NTFS. – KirkD_CO Feb 14 '14 at 17:46
  • Hmmm. I've been going from HFS+ to NTFS with similar behavior. But in my case, it is updating all NTFS directories every time, but files, only the ones it should be. superuser.com/questions/1111844/… – WGroleau Aug 12 '16 at 5:32
2

No, the permission are not preserved. NTFS has no knowledge of Linux ownerships and permissions.

  • Instead of NTFS, copy the files to some Linux compatible file system, e.g. ext3 or ext4, and the permissions will be copied over. – Kevin Panko Feb 13 '14 at 21:42
  • 2
    And this is why rsync keeps trying to set the permissions on every backup, correct? No files are copied, but it tries to modify permissions? – KirkD_CO Feb 13 '14 at 23:05
  • Correct. If you want to avoid that format the NTFS device w/ ext2/3/4 (jfs, xfs, reiser, ... anything Linux native) :) – tink Feb 14 '14 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.