aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/README.md b/README.md
index 307829b..bedc4fb 100644
--- a/README.md
+++ b/README.md
@@ -94,3 +94,37 @@ to = "/mirror/youtube-dl"
Configuration may also be split across files in a directory. By default
loads configuration from /etc/mirror/mirror.toml and the /etc/mirror/conf.d
directory.
+
+## Staging and Verification (Experimental)
+
+You can ensure mirror integrity by verifying the project in a staging directory
+before saving it.
+
+Use the 'verify' parameter to define Bash executed shell commands. A non-zero
+exit value is considered a verification failure. The standard error output is
+then written to the log.
+
+Use the 'staging-method' and 'staging-path' parameters to customize how the
+incoming mirror version is stored. Both these values can be defined globally
+or specific to a mirror.
+
+The possible 'staging-method' values are:
+
+ - none: Save the data directly to the mirror destination.
+ - temporary: Save the data in a directory to be deleted after verification.
+ - persistent: Use a second location to store incoming data without clearing it after.
+
+The 'staging-path' defines the parent directory for where staging occurs, by default it is '/tmp/mirror'.
+
+```
+[[mirrors]]
+method = "rsync"
+from = "rsync://mirrors.kernel.org/slackware/slackware64-15.0"
+to = "/mirror/slackware/slackware64-15.0"
+staging-path = "/tmp/mirror"
+staging = "persistent"
+verify = """
+ (gpg --verify-files *.asc && tail +13 CHECKSUMS.md5 | md5sum -c --quiet -) && \
+ (find slackware64 -print0 -name '*.asc' | xargs -0L1 gpg2 --verify-files)
+"""
+```