Close the last four headers, and say what the destructive tools refuse to do
This commit is contained in:
@@ -28,6 +28,42 @@
|
||||
# pointing at a directory the data is not in is worse than not having started.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL MODEL
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Two halves, in order: move the files, then rewrite the conf keys that point at them. Doing it
|
||||
# the other way round would leave every path variable naming a location nothing had reached yet,
|
||||
# and any script that ran in between would create the old layout again underneath the new one.
|
||||
#
|
||||
# Idempotent. A path already under DATA_DIR is left alone, so a re-run after a partial migration
|
||||
# finishes the job rather than moving things twice or failing on what is already done.
|
||||
#
|
||||
# One-time by intent, not by a marker file. There is no "already migrated" flag — the check is
|
||||
# whether each individual path is already where it belongs, which is also what makes an
|
||||
# interrupted run safe to repeat.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# DESIGN PRINCIPLES
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Existing keys are rewritten, which is why conf_upgrade cannot do this.
|
||||
# conf_upgrade adds keys the template has and the installation does not, and never rewrites a
|
||||
# value the operator already holds — correct for it, and exactly why it is the wrong tool here.
|
||||
# STATE_DIR, BANDWIDTH_LOG, AI_INDEX_DB and two dozen more are existing keys whose values must
|
||||
# change, or they would go on naming the old layout forever while the new directory variables
|
||||
# sat beside them unused.
|
||||
#
|
||||
# Move, never copy-and-hope.
|
||||
# The data being relocated is the only copy — statistics, histories, the AI index, arr caches.
|
||||
# Everything is moved and the source is gone afterwards, so there is no second location that
|
||||
# might still be written to by something that missed the change.
|
||||
#
|
||||
# The conf rewrite is the last thing, and the riskiest thing.
|
||||
# Until it happens the installation still works from the old layout. That ordering means an
|
||||
# abort partway through leaves a system that runs, rather than one whose paths point at
|
||||
# nothing.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL SAFEGUARDS
|
||||
# ==============================================================================================
|
||||
#
|
||||
@@ -49,6 +85,25 @@
|
||||
# check costs nothing and the failure is silent otherwise.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# CONFIGURATION
|
||||
# ==============================================================================================
|
||||
#
|
||||
# This script reads conf to find the old locations and rewrites conf to record the new ones. It
|
||||
# is the one script here whose purpose is to change these values rather than obey them.
|
||||
#
|
||||
# Read to locate what moves
|
||||
# STATE_DIR, BANDWIDTH_LOG, AI_INDEX_DB, AI_MEMORY_FILE, AI_TOKEN_DB, ARR_CLEANUP_STATS,
|
||||
# ARR_SYNC_BLOCKLIST, CORRUPTION_SCAN_STATE_FILE, LIDARR_CACHE_FILE, ZFS_REPORT_LOG and the
|
||||
# rest of the per-script path keys — roughly two dozen in total.
|
||||
#
|
||||
# Written as the new roots
|
||||
# DATA_DIR and the directories beneath it: DB_DIR, STATE_DIR, AI_DATA_DIR,
|
||||
# CACHE_BACKUP_DIR, ARR_CACHE_BACKUP_DIR, CONF_CACHE_BACKUP_DIR, LOG_ARCHIVE_DIR.
|
||||
#
|
||||
# Every rewritten value is expressed as ${DB_DIR}/… rather than an absolute path, so a later
|
||||
# storage-mode migration moves them again by changing one variable.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# RUNTIME MODES
|
||||
# ==============================================================================================
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user