1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
RDUP DESIGN DOC
1/ GOALS
1) Keep it Simple
2) Fast
3) Small
2/ HIGH LEVEL
Full dump:
1) Crawl all directories, and print all the names found to
standard output.
2) Write a filelist with all the names found when crawling.
Use this list to calculate the correct incremental dump.
Incremental dump:
1) Read in the filelist that was written when doing a full dump.
2) Crawl all the directories again.
3) Diff 1) and 2) to get two lists; one of removed items and one
of added/modified items.
4) Write the removed items to standard output
5) Write the modified/new items to standard output.
6) Write a new filelist.
7) Touch the time stamp file.
3/ C FILES
This section is reasonable correct for rdup, rdup-tr and rdup-up
are not mentioned at all.
crawler.c
The crawler recursively descends into directories.
Each found item (file, symlink or directory) is placed into a GTree
with a value of VALUE (only the keys are used by rdup).
When a .nobackup is found the entry's value is changed from
VALUE to NO_PRINT. The functions that write the list know that
NO_PRINT values should not be written nor printed. (The entry
can not simple be removed, because that messes up the flow of
the GTree).
So in rdup each item (a path) can have three values:
NULL
initial value, used by GTree to signal 'not found'.
VALUE
rdup uses this to differentiate between 'not found' and
found items.
NO_PRINT
don't print items with these values.
gfunc.c
This file contains all functions that operate on GTree's.
getdelim.c
A getdelim() implementation for systems that don't have the GNU
one.
rdup.c
Contains main() and a few functions that perform the
initialization. Also reads and writes the internal filelist.
signal.c
Contains a signal handling function.
regex.c
Regular expression functions.
xattr.c
Extended attributes functions. Not used anymore, because this
cannot be done in a portable way.
sha1.c
SHA-1 implementation, for file hashing.
link.c
Hardlink detection; have we seen this dev,ino pair already?
|