aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2025-04-21 16:45:39 -0500
committerSlack Coder <slackcoder@server.ky>2025-04-22 15:27:36 -0500
commitd75e17a48934e4896963fb0fee78dbd53f4e780b (patch)
tree27a4fd16640846df846d36d2fc5b898189b68620 /README.md
parente7dd47e8b683a51851883bf2918086963676d7cd (diff)
downloadmirror-d75e17a48934e4896963fb0fee78dbd53f4e780b.tar.xz
Implement staging and verificationv0.0.3
Ensure data integrity by supporting data staging and verification.
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)
+"""
+```