-*-text-*- $Header: /CVSROOT/public/scylla-charybdis/md5backup/doc/internals.txt,v 1.2 2004/07/05 23:53:52 tino Exp $ md5backup works as follows: Traverse the directories given (stay in the same filesystem). If an ignored directory is found, it is skipped (recoursively). For all files found: Check if the file is ignored, if so, skip this file. Locate the file in the database. If not there Do a backup of this file else Consult the modification timestamp. If newer do a backup of this file Backup is done as follows: Append a log entry. Write the file into tmp/ directory. Record md5 while written. Append the result to the md5 file (md5/ directory). Loop a counter counting from 0 if md5 file in the files/ hierarchy with the count exists: compare the temporary with it If equal: delete temporary file break out of loop else move temporary to files/ hierarchily as md5 file with count and hardlink these file to the = targets as well. break out of loop Update the database Append apropriate log entry. Note that usually count will be 0, as currently there are no files known which have the same MD5 sum but different contents. If there is trouble with the = targets, count will go to infinity, thus md5backup will starve looping in the count. Yes, this is a bug, but will not be solved in the next time I think. (Note that I think I fixed the bug already arround 0.3.3.) $Log: internals.txt,v $ Revision 1.2 2004/07/05 23:53:52 tino va_copy not defined in all systems Revision 1.1 2004/05/09 23:18:48 tino copied from README