git @ Cat's Eye Technologies ellsync / c737017
More edits to README. Chris Pressey 5 years ago
1 changed file(s) with 21 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
0 ellsync
1 =======
0 `ellsync`
1 =========
22
33 _Version 0.2_
44 | _Entry_ [@ catseye.tc](https://catseye.tc/node/ellsync)
88
99 <img align="right" src="images/ellsync-logo.png?raw=true" />
1010
11 ellsync is an opinionated poka-yoke for rsync.
11 **`ellsync`** is an opinionated poka-yoke for rsync.
1212
13 * **opinionated**: it was designed for a particular use case for rsync
13 * [opinionated][]: it was designed for a particular use case for rsync
1414 (offline backups).
15 * **poka-yoke**: it exposes a restricted interface to rsync, which
15 * [poka-yoke][]: it exposes a restricted interface to rsync, which
1616 prevents using it in dangerous ways.
1717
18 It also happens to provide some convenience, since the restricted
19 interface can be accessed by shorthand form, but the real purpose is
20 to increase safety. (I've been burned more than once using `rsync`
21 incorrectly.)
18 Because the restricted interface that `ellsync` presents can be accessed
19 by shorthand form, it also happens to provide some convenience over
20 using `rsync` directly — but its real purpose is to increase safety.
21 (I've been burned more than once when I've made a mistake using `rsync`.)
2222
2323 Quick start
2424 -----------
3232
3333 ### Backup router
3434
35 ellsync's operation is based on a *backup router* which is a JSON file
35 `ellsync`'s operation is based on a *backup router* which is a JSON file
3636 that looks like this:
3737
3838 {
7474 we will be prevented, because it is an error, because the direction of
7575 the backup stream is always from canonical to cache.
7676
77 Various other configurations are prevented. You may have noticed that rsync
78 is sensitive about whether a directory name ends in a slash or not. ellsync
77 Various other configurations are prevented. You may have noticed that `rsync`
78 is sensitive about whether a directory name ends in a slash or not. `ellsync`
7979 detects when a trailing slash is missing and adds it. Thus
8080
8181 ellsync router.json syncdirs /media/user/External1/art /home/user/art/
9292 Either the canonical or the cache (or both) may be offline storage (removable
9393 media), therefore neither directory is assumed to exist (it might not exist
9494 if the volume is not mounted.) If either of the directories does not exist,
95 ellsync will refuse to use this backup stream. Based on this, there is a
95 `ellsync` will refuse to use this backup stream. Based on this, there is a
9696 subcommand to list which streams are, at the moment, backupable:
9797
9898 ellsync router.json list
106106 ellsync router.json sync art:
107107
108108 Also, since the contents of the canonical and the cache normally
109 have the same directory structure, ellsync allows specifying that
109 have the same directory structure, `ellsync` allows specifying that
110110 only a subdirectory of a stream is to be synced:
111111
112112 ellsync router.json sync /home/user/art/painting/ /media/user/External1/art/painting/
125125
126126 Sometimes you want to rename a subdirectory somewhere under the canonical of
127127 one of the streams. It's completely fine to do this, but the next time it is synced,
128 rsync will treat it, in the cache, as the old subdirectory being deleted and
128 `rsync` will treat it, in the cache, as the old subdirectory being deleted and
129129 a new subdirectory being created. If there are a large number of files in the
130130 subdirectory, this delete-and-create sync can take a long time. It's also not
131 obvious from rsync's logging output that everything being deleted is also being
131 obvious from `rsync`'s logging output that everything being deleted is also being
132132 created somewhere else.
133133
134 To ease this situation, ellsync has a `rename` command that works like so:
134 To ease this situation, `ellsync` has a `rename` command that works like so:
135135
136136 ellsync router.json rename art: sclupture sculpture
137137
165165
166166 ### 0.2
167167
168 Every ellsync functionality has an explicit subcommand (`list` and `sync` to
168 Every `ellsync` functionality has an explicit subcommand (`list` and `sync` to
169169 start.)
170170
171171 `sync` was split into `sync` (takes a stream) and `syncdirs` (takes to and
176176 ### 0.1
177177
178178 Initial release.
179
180 [opinionated]: https://softwareengineering.stackexchange.com/questions/12182/what-does-opinionated-software-really-mean
181 [poka-yoke]: https://en.wikipedia.org/wiki/Poka-yoke