Only show changed files while syncing from ext4 to NTFS
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Secret Catacombs
--
Chapters
00:00 Only Show Changed Files While Syncing From Ext4 To Ntfs
01:13 Answer 1 Score 5
01:33 Accepted Answer Score 0
02:20 Answer 3 Score 1
03:12 Answer 4 Score 1
03:19 Thank you
--
Full question
https://superuser.com/questions/472362/o...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#rsync
#avk47
ANSWER 1
Score 5
You could try using --omit-dir-times
switch to ignore directory times (take a look at rsync man page).
I personally find that using -c
switch is the best way to ensure that only the files whose contents has been changed show up in the output.
Note that using -c
will slow down rsync.
ANSWER 2
Score 1
Instead of changing the mount type you can also tell rsync to ignore file permissions when copying to a filesystem that doesn't support it. The following command works for me.
From the rsync man page:
In summary: to give destination files (both old and new) the source permissions, use --perms. To give new files the destination-default permissions (while leaving existing files unchanged), make sure that the --perms option is off and use --chmod=ugo=rwX (which ensures that all non-masked bits get enabled). If you’d care to make this latter behavior easier to type, you could define a popt alias for it, such as putting this line in the file ~/.popt (the following defines the -Z option, and includes --no-g to use the default group of the destination dir):
rsync alias -Z --no-p --no-g --chmod=ugo=rwX
ANSWER 3
Score 1
don't use -a, it contain -p -o -g.
ACCEPTED ANSWER
Score 0
Looks like it was a permission issue. Not sure why .. But I've edited /etc/fstab for NTFS partitions and it now works as expected, ie no printing of directories that haven't been modified.
Old fstab entry: ntfs-3g users,defaults,exec,uid=1000 0 0
New fstab entry: ntfs-3g users,defaults,exec,uid=1000,gid=1000,dmask=077,fmask=137 0 0
Im guessing (who knows ..) dmask=077 did the trick ie 'drwx---' instead of 'drwxrwx'.