-
Notifications
You must be signed in to change notification settings - Fork 0
Common Operations
Day-to-day commands for managing the media stack. Sections below cover deployment (single service, all services, full site), backup, restore, migration from existing LXC containers, lint, image pruning, log inspection, and dry-run/check-mode workflows.
ansible-playbook playbooks/deploy-service.yml -e service_name=radarransible-playbook playbooks/deploy-services.ymlProvision the VM, configure the base system, and deploy all services:
ansible-playbook playbooks/site.yml
# Or step by step:
ansible-playbook playbooks/provision-vm.yml
ansible-playbook playbooks/setup-base.yml
ansible-playbook playbooks/deploy-services.yml# Run backups for all services
ansible-playbook playbooks/backup.ymlSee Backup & Restore for details on automated timers, retention, encryption, and restore procedures.
ansible-playbook playbooks/restore.yml \
-e service_name=radarr \
-e backup_file=/data/backups/config/radarr/radarr-2025-01-15.tar.zst.ageFor encrypted backups, pass the identity file:
ansible-playbook playbooks/restore.yml \
-e service_name=radarr \
-e backup_file=/data/backups/config/radarr/radarr-2025-01-15.tar.zst.age \
-e backup_age_identity_file=/path/to/age-identity.txtMulti-container services (e.g., Open Notebook) work the same way:
ansible-playbook playbooks/restore.yml \
-e service_name=open-notebook \
-e backup_file=/data/backups/config/open-notebook/open-notebook-2025-01-15.tar.zst.age \
-e backup_age_identity_file=/path/to/age-identity.txtSee Backup & Restore for full restore instructions.
ansible-playbook playbooks/migrate.yml -e source_host=old-lxc-hostThis will:
- Create a Proxmox snapshot for rollback
- Verify SQLite integrity on source
- Rsync config directories to the new VM (Immich skips regenerable content: thumbnails, transcoded video, profile images)
- Fix ownership and start services
- Verify health checks pass
ansible-lint playbooks/ roles/
yamllint .Dangling container images are cleaned up automatically by a weekly timer and after each successful autodeploy. To run a manual prune:
# Prune dangling images only
podman image prune -f
# Check disk usage
podman system df# Run an inspection immediately
systemctl --user start mms-log-inspect.service
# Check the scheduled timer
systemctl --user status mms-log-inspect.timer
systemctl --user list-timers mms-log-inspect.timer
# Read the latest report
python3 -m json.tool ~/config/logging/inspection/latest-report.json
# Validate policies locally before deployment
scripts/generate-test-corpus \
--scenario faulty \
--entries 40 \
--output /tmp/mms-faulty.jsonl
scripts/mms-log-inspect \
--input-jsonl /tmp/mms-faulty.jsonl \
--policy examples/log-policies \
--output-json /tmp/mms-log-report.json \
--fail-on criticalSee Observability for the policy schema, notification setup, and troubleshooting notes.
ansible-playbook playbooks/site.yml --check --diff