git @ Cat's Eye Technologies Space-Madness / df26ed2
Define 'backed up' for depositories, and talk a bit about repos. Chris Pressey 6 years ago
1 changed file(s) with 33 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
1919 A subject is expected to have the same content in all the different depositories
2020 in which it appears. (This is not 100% true, but it's useful to think of them
2121 this way.)
23 Because subjects are hierarchical, it is also possible to think of (and treat)
24 a subject as a sort of sub-depository.
2623 There are three kinds of depositories:
5451 (perhaps because the filesystem on which the canonical depository is stored
5552 is not available at the moment) but which are intended to be put there soon.
57 There are two important actions on depositories.
54 With these definitions, we can say that a canonical depository is _backed up_
55 if and only if every subject in it exists in at least one cache depository
56 which resides on a different physical medium than the canonical depository.
58 Note that two partitions on the same hard disk are *not* different physical
59 media!
61 The goal of the backup system is that every interesting file is in a canonical
62 depository, and that every canonical depository is backed up.
64 To accomplish this goal, there are two important actions on depositories.
5966 ### Update a cache depository from a canonical depository ###
8188 but incorporates some consistency checking, i.e. that you don't trample
8289 something in the canonical depository with something in the incoming with the
83 same name.
90 same name. (Also, `rsync` is pretty picky about directory names, and if
91 you forget the trailing slash, bad things can happen. So it helps there too.)
8593 The `deposit` tool takes an additional flag, `--clean`, which deletes all the
8694 files (but not the directories) in the incoming depository after they are
9098 It is an excellent idea to update a cache depository from the canonical
9199 depository after running `deposit` (and before running `deposit --clean`.)
101 ### Advanced Topics in Backup Subjects ###
103 Because subjects are hierarchical, it is also possible to think of (and treat)
104 a subject as a sort of sub-depository.
106 It is up to you to decide if you have any backup use cases that are complex
107 enough to justify doing that.
109 It is also useful to keep certain backups in version-controlled repositories,
110 e.g. git repos. In this case, a repo directory can usually be treated as
111 a subject. Instead of depositing files with `deposit`, one can push changes
112 to the repo-subject residing in the canonical depository.
114 ### Read-only Depositories ###
116 Need to research this, but the basic idea would be to `chmod -R` a
117 cache depository so that you don't accidentally change files in it
118 or add files to it. (But then changing the permissions back when you
119 need to update it from a canonical depository.)
93121 Additional tools
94122 ----------------