I did not find a backup (synchronization) program that does what I want, so I am thinking of writing my own.
Now I have the following: it goes through the data in the source and for each file that has its own bit, the archive bit OR does not exist at the destination, copies it to the destination, overwriting, possibly, the existing file. When this is done, it checks all the files in the destination, if it exists in the source, and if not, deletes it.
The problem is that if I navigate or rename a large folder, it is first copied to the destination, even if it already exists in principle, it just has a different path. Then the folder that was already there is subsequently deleted.
Besides unnecessary copying, I often run into space problems because my backup drive is not large enough to save the original data twice.
Is there a way to programmatically identify such moved / renamed files or folders, i.e. NTFS ID or physical location on media or something else? Are there any solutions to this problem?
I don't care about the programming language, but the hints for this with Python, C ++, C #, Java or Prolog are appreciated.
source
share