HSLG Media

hslg-backup-mariadb.sh

hslg-backup-mariadb.sh

Source file: deployment/ubuntu-virtualmin/bin/hslg-backup-mariadb.sh

Module: deployment-ubuntu-virtualmin

Size: 34 lines

SHA-256: 01c9b0d8993a3e148ec34e08d58a8fcae4fa1c237bef1a57657886ac81915ee9

Responsibility

Implements this named HSLG source responsibility; inspect its declarations and tests before changing behaviour.

Declared entry points

No explicitly named class/function declarations detected; check script entry point and invocation.

Imports and dependencies

No direct import declarations detected in this file.

Behaviour and audit locations

  • Line 2: # Backup ONE named database without revealing credentials on the command line.
  • Line 3: # Usage: HSLG_DB_NAME=wordpress_stage HSLG_DB_CREDENTIALS=/root/.hslg-db.cnf \
  • Line 8: : "${HSLG_DB_CREDENTIALS:?Provide a protected MariaDB defaults file}"
  • Line 12: [[ -f "$HSLG_DB_CREDENTIALS" && ! -L "$HSLG_DB_CREDENTIALS" ]] || { echo 'Missing or symlinked credentials file' >&2; exit 2; }
  • Line 13: [[ "$(stat -c '%a' "$HSLG_DB_CREDENTIALS")" == 600 ]] || { echo 'Credentials file must be chmod 600' >&2; exit 2; }
  • Line 22: mariadb-dump --defaults-extra-file="$HSLG_DB_CREDENTIALS" \

Relationship to the system

This page is the file-level source reference, not the architecture rationale. Read the module explanation, the corresponding architecture decision and user guide before changing behaviour. Names and line locations above are extracted from this exact source version; they are reference points, not proof that an external service or a phone feature works.

Change verification

Review the entry points and errors in this file, then run the module’s associated tests, source dependency gate, history gate and documentation coverage check. If the file changes an API response, user interaction, data model, deployment or third-party dependency, revise those human explanations and disaster recovery/licensing when relevant. Do not infer actual native or external API operation from source presence.