Explain things more fully in the README.
Chris Pressey
6 years ago
6 | 6 | |
7 | 7 | The main unit of organizing files in Space Madness is the *depository*, which is |
8 | 8 | a directory tree. The subdirectories in a depository are called *subjects*. |
9 | Subjects are hierarchical (for example, you might have `art` and `art/watercolours`) | |
10 | and are expected to have the same content across different depositories. (This | |
11 | is not 100% true but it's useful to think of them this way.) | |
9 | 12 | |
10 | There are three kinds of depostories: | |
13 | There are three kinds of depositories: | |
11 | 14 | |
12 | 15 | * canonical depository |
13 | 16 | |
14 | 17 | This contains the canonical copy of the files it contains. You might have |
15 | more than one canonical depository, but their contents do not overlap. | |
16 | e.g. One canonical depository for text files, another canonical depository | |
18 | more than one canonical depository, but their contents do not overlap; | |
19 | e.g. one canonical depository for text files, another canonical depository | |
17 | 20 | for movies. |
21 | ||
22 | Canonical depositories can be stored on removable media, e.g. a USB stick | |
23 | or external hard drive. This is convenient if the files are used on more | |
24 | than one computer, e.g. your laptop and your desktop. | |
18 | 25 | |
19 | 26 | * cache depository |
20 | 27 | |
23 | 30 | depository containing an entire copy (that's what makes this a backup |
24 | 31 | system.) But it might also have cache depositories for convenience of |
25 | 32 | access. For example, I might want to keep a copy of my software documentation |
26 | on my netbook. Files saves to a cache depository are in jeopardy; they are | |
27 | apt to be overwritten or deleted when the cache is updated. So don't do that. | |
33 | on my netbook. | |
34 | ||
35 | Files saved to a cache depository are in jeopardy; they are apt to be | |
36 | overwritten or deleted when the cache is updated. So don't do that. | |
28 | 37 | |
29 | 38 | * incoming depository |
30 | 39 | |
39 | 48 | |
40 | 49 | rsync --archive --verbose --delete $CANONICAL/subject/ $CACHE/subject/ |
41 | 50 | |
42 | We might provide a wrapper for that here. | |
51 | To check if a cache depository is up-to-date with a canonical depository, | |
52 | ||
53 | rsync --archive --verbose --delete --dry-run $CANONICAL/subject/ $CACHE/subject/ | |
54 | ||
55 | We might provide a lightweight wrapper for those. | |
43 | 56 | |
44 | 57 | To update a canonical depository from an incoming depository, |
45 | 58 | |
46 | 59 | deposit $CANONICAL $INCOMING |
47 | 60 | |
61 | In fact this is virtually the same as saying | |
62 | ||
63 | rsync --archive --verbose $INCOMING/ $CANONICAL/ | |
64 | ||
65 | but incorporates some consistency checking, i.e. that you don't trample something | |
66 | in the canonical depository with something in the incoming with the same name. | |
67 | ||
48 | 68 | There are two other tools in this repo which are useful for maintenance purposes. |
49 | 69 | We should eventually document them here too. |