tools: Export- und Eingangsordner im Backup-Ziel - Überschneidungsregel nur noch auf <ziel>/git und den eigenen Maschinenordner, Laufzeitprüfung auf Vorfahren in upload collect und export run (#216); 10.1.0-beta.16
CI / verify (push) Successful in 8m17s
CI / pwsh (push) Successful in 2m52s
Release / converters (push) Successful in 26s
Release / release (push) Successful in 37s
Release / wiki-mirror (push) Skipped

Files changed:
- CHANGES.md
- VERSION
- docs/how-to/back-up-to-a-synced-folder.md
- docs/how-to/collect-from-a-synced-folder.md
- docs/how-to/export-to-a-synced-folder.md
- docs/reference/commands/exports.md
- docs/reference/commands/raw-material-and-uploads.md
- docs/reference/configuration.md
- tools/CONTRACT.md
- tools/chemenu/backup.py
- tools/chemenu/collect.py
- tools/chemenu/commands/export_cmd.py
- tools/chemenu/commands/upload_cmd.py
- tools/chemenu/config_shapes.py
- tools/chemenu/page_export.py
- tools/chemenu/tests/test_collect.py
- tools/chemenu/tests/test_export_run.py
- tools/chemenu/upload.py

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
torbenandClaude Sonnet 5.5 committed 2026-10-16 11:19:12 +02:00
1 parent b48a35b224
commit 02bf3b0403
18 files changed
+312 -41

No files matched your search

+24
View File
@@ -11,6 +11,7 @@ push to and a copy of the files on this machine that are not in git. What the se
- [Why the instance does not live in the synced folder](#why-the-instance-does-not-live-in-the-synced-folder)
- [Set it up](#set-it-up)
- [One folder for the backup, the intake and the export](#one-folder-for-the-backup-the-intake-and-the-export)
- [What is backed up, and what is not](#what-is-backed-up-and-what-is-not)
- [Restore](#restore)
- [One device writes](#one-device-writes)
@@ -91,6 +92,29 @@ still happened. Fix what the line names - a synced folder that is not there, a f
writable - and run `tools/wikitool backup run`. Another publish does not help: it has nothing new to
push.
## One folder for the backup, the intake and the export
The target may be the one folder your whole setup shares. The backup writes only into `git` and into
the folder of its own machine; everything else in the target belongs to the sync folder, so an
[intake folder](collect-from-a-synced-folder.md) and an
[export folder](export-to-a-synced-folder.md) can sit beside them:
```
<OneDrive - company>\Chemenu\ backup.target
git\ the bare repository (backup init, publish)
<MACHINE>\ this machine's data (backup run, publish)
Inbox\ intake channel, handler folder
Export\ export target
```
The rule behind it: no export and no intake folder may be, or lie in, `<target>\git` or a machine
folder. For the export that holds from above as well (its path must not contain them either); an
intake folder may sit above them, since `upload collect` reads only the top level of its folder.
`doctor` checks the part that the settings can show. What they cannot show - the folder of another
machine, or one that a machine starts to fill later - is checked when the command runs: `upload
collect` and `export run` refuse a folder that holds or lies in a `.chemenu-backup.json`, a bare
repository or (for `upload collect`) a `.wikitool-export.json`, and touch nothing in it.
## What is backed up, and what is not
| Path | Backed up | Why |
+7 -2
View File
@@ -44,8 +44,13 @@ checkout, so it is yours to edit by hand in `.wikitool-local.json`.
}
```
`path` has to be absolute and lie outside the instance. Check it with `tools/wikitool doctor`, then
pull:
`path` has to be absolute and lie outside the instance. It may sit in the folder that also holds
the backup and an export, as `<OneDrive - company>\Chemenu\Inbox` beside `git`, the machine folder
and `Export` ([the layout](back-up-to-a-synced-folder.md#one-folder-for-the-backup-the-intake-and-the-export)),
but it must not be, or lie in, `<backup.target>/git` or a machine folder of the backup. `upload
collect` also refuses, for that channel alone and before it reads anything, a folder that holds or
lies in a machine folder of any machine, a bare repository or an export: it empties its folder, and
these are not submissions. Check it with `tools/wikitool doctor`, then pull:
```bash
tools/wikitool upload collect # every pull channel
+6 -2
View File
@@ -38,8 +38,12 @@ look like: [configuration reference](../reference/configuration.md#export-to-a-f
1. **Pick the folder**: a folder inside the synced folder, for example
`C:\Users\<you>\OneDrive - <company>\Chemenu-Lesefassung`. It must be empty or not exist yet,
and it must lie outside the instance, outside every other export target, outside every `intake`
folder and outside `backup.target`.
and it must lie outside the instance, outside every other export target and every `intake`
folder, and apart from the folders the backup writes into: it may not be, lie in or contain
`<backup.target>\git` or the backup's machine folder, nor lie in another machine's folder or a
bare repository. A folder beside them is fine, so one synced folder can hold the backup, an
intake folder and the export, with the export in `<OneDrive - company>\Chemenu\Export`
([the layout](back-up-to-a-synced-folder.md#one-folder-for-the-backup-the-intake-and-the-export)).
2. **Write the `export` section** into `.wikitool-local.json` at the root of the instance - by hand,
since its fields decide what leaves this machine and which program runs, and `config set`
refuses them: