Rsync oddity when copying files to prepare for an upgrade

Upgrading from 42.2 to 15.1 hence prefix.

I’ve used rsync to copy my home directory to another drive to eventually transfer selectively to a completely new machine.

rsync -rvh  /home/john ./

The copy is where I wanted it etc but if I use dolphin to check number of files etc the destination directory content is lower than the source, both file and folder counts. The desktop was active when I did this but the same thing happens when I copy other directories which are an rsync’d backup of previous version’s homes. Not sure what it has missed or if it matters but would be nice to know.


My guess is that you are not transferring symlinks; these are still in the source but not in the destination. The rsync man page recommends -av rather than the -rvh you have used as -a transfers symlinks.

Yes. That seems to explain the missing files.Thanks.

Finding a command off the web

find . -type l -ls

Plenty of links on the source directories and none on the copies. Actually it looks like it’s best not to copy them. Some are ones I have added myself. More from certain applications and more that look to be system related.

:wink: Just so long as they don’t provide links to my browser bookmarks as I don’t want to loose those. I assume these are somewhere in ~home /.local


Please do yourself a favor and use -av . The links aren’t there for no reason, certainly not the ones you put there yourself. They belong to a proper backup.

It isn’t a back up. It’s for transferring a collection of files I have built up over many years plus emails and browser bookmarks. Any system related and other links copied wouldn’t function in my new machine.