Update documentation

This commit is contained in:
2026-10-23 21:44:54 +03:00
parent d52db8cf52
commit 8b6b9e6093
3 changed files with 53 additions and 10 deletions
+6 -5
View File
@@ -60,7 +60,7 @@ DB_PASS=your_database_password \
| `DB_NAME` | `piwigo` | Database name |
| `DB_USER` | `piwigo` | Database user |
| `DB_PASS` | **required** | Database password (or auto-detected) |
| `DB_CONTAINER` | auto-detect | Database container name (e.g., `ep-piwigo-docker-piwigo-db-1`) |
| `DB_CONTAINER` | auto-detect | Database container name. Auto-detects TrueNAS 27+ style (`ix-*-mariadb`, `ix-*-mysql`) then falls back to generic patterns |
| `DB_PASSWORD_ENV` | auto-detect | Password env var in container (`MYSQL_PASSWORD`, `MYSQL_ROOT_PASSWORD`, `MARIADB_PASSWORD`, etc.) |
| `PIWIGO_UPLOADS_PATH` | **required** | Host path to uploads dataset |
| `PIWIGO_CONFIG_PATH` | **required** | Host path to config dataset |
@@ -254,7 +254,7 @@ The script checks these env vars in the database container:
### Option 3: Specify container and env var
```bash
DB_CONTAINER=ep-piwigo-docker-piwigo-db-1 \
DB_CONTAINER=ix-piwigo-mariadb-1 \
DB_PASSWORD_ENV=MYSQL_ROOT_PASSWORD \
./backup-piwigo-truenas.sh
```
@@ -272,8 +272,8 @@ DB_PASSWORD_ENV=MYSQL_ROOT_PASSWORD \
# If host tools available
mariadb -h localhost -u piwigo -p<DB_PASS> piwigo -e "SELECT 1"
# If using docker
docker exec ep-piwigo-docker-piwigo-db-1 mariadb -u piwigo -p<DB_PASS> -e "SELECT 1"
# If using docker (TrueNAS 27+ container name pattern)
docker exec ix-piwigo-mariadb-1 mariadb -u piwigo -p<DB_PASS> -e "SELECT 1"
```
### Backup Fails: "Path does not exist"
@@ -284,9 +284,10 @@ DB_PASSWORD_ENV=MYSQL_ROOT_PASSWORD \
### Backup Fails: "Cannot connect to database in container"
1. Check container name: `docker ps | grep -i mariadb`
1. Check container name: `docker ps | grep -iE 'ix-.*mariadb|ix-.*mysql'`
2. Verify password env var name: `docker inspect <container> | grep -i password`
3. Try setting `DB_PASSWORD_ENV=MYSQL_ROOT_PASSWORD` (common for root password)
4. Script now auto-detects `ix-*-mariadb` and `ix-*-mysql` containers
### Restore Fails: "Database not ready"