I'm trying to make a backup system in Java. Copies files that have been changed since last backup.
So far so good.
But struggle with the backup when users change name of files or directories.
Tried the "WATCH" konsept in Java. It works in a way, but find it a bit complex. Has to run as a service, all the time, and can only watch one directory, I think.
I see that commercial backup systems discover change in directoryname instantly. How do they do that?

Anybody that has built their own backup system, and has solved this problem?