Keeping FLAC files on two drives in sync with rsync on linux
Hello, I have two external drives. One of the drives is named "drive2" and it contains a folder named "Music." This folder has the following structure:
drive2/ /Music/ Pink Floyd/ 1982 - Album Name/ 01 - Track.flac 02 - Track2.flac and so on.. So, because of the folder hierarchy I guess I need a recursive sync. I need the entire Music folder from drive2 to be copied to drive1. I think I can use something like this: rsync -av drive2/Music/ drive1/Music/ However, there are situations when I modify the metadata of certain songs. Those metadata modifications are small like changing the title of the album, and those modification don't necessarily change the size of the FLAC files, but their md5 fingerprint definitely changes because of altering the metadata. Right? I noticed that when I use rsync -a, the rsync utility notices the metadata changes of FLAC files on drive2 and updates the files on drive1 as well to be in sync. Only the changed files gets transferred, which is exactly the behaviour I want. It seems to me that the -a (archive) flag implies the -u which tells to only update changed files. However, I'm curious when rsync transfers the files that got their metadata updated, does the old files get overwritten completely on drive1? I mean they are replaced completely? Also, do you see anything wrong in the way I used the rsync command with the `-av` flag?