I synchronise my music collection between:
- My desktop's RAID10, where I rip CDs and download music to, and
- The house media centre, which controls audio players around the house
I do this with a very simple, little rsync command:
rsync -av /media/ned/music/ tank:/media/steve/music/
Occasionally I'll delete something on my desktop, or rename it. When I sync again Tank keeps the old copy and this can result in duplicates.
I know there are --delete-{before/after} options but I am very apprehensive about automatic deletions. There is no third backup yet, so if I make a mistake (which I have before) and rsync nukes my "backup" on Tank, I've lost data.
Is there a way to generate a list of potential deletions after a transfer has finished? Ideally rsync would present me the list and give me a [y/N] prompt but I'm more than happy doing this in a separate command (I'll just write a syncmusic script).
-n(dry run) option. Would that work? – Jos Dec 07 '15 at 10:45diff -ror I personally likecolordiff -r(-r for recursive) . I normally run it afterrsyncbut you could do it before. If you run this - files and subfolders that are present in one folder/system but not in the other will be reported in the output as<file> not present– the_velour_fog Dec 07 '15 at 12:47