Zum Hauptinhalt springen

Upgrading

Vodia Analytics supports near zero-downtime upgrades. Upgrades require a brief restart (5–10 seconds). No data is lost.

important

Please perform a full backup of the virtual machine before proceeding with any upgrades.

Upgrading to 1.2.5: this release requires migration scripts to be run after the upgrade completes. Existing installations will not see the full performance improvements until these have been run. See the 1.2.5 release notes for the required steps.

First start after upgrading takes 2–3 minutes

New database indexes are built when the API starts. On a one-million-call system this takes around 2–3 minutes, during which the web interface and CDR ingestion are unavailable.

docker compose up -d may print dependency api failed to start while this happens. This is expected — do not interrupt it.

Monitor progress with docker compose logs -f api and wait for API listening on 3000.

Standard Upgrade

cd cdrstats && test -f docker-compose.yml && test -f .env && \
UPD=".cdrstats-upd.$(date +%s)" && \
wget https://cdn.vodia.net/cdrstats/cdrstats.zip -O cdrstats-update.zip && \
unzip -oq cdrstats-update.zip -d "./$UPD" && \
test -d "./$UPD/cdrstats" && \
cp .env .env.bak.$(date +%s) && \
cp .env /tmp/.env.cdrstats.bak && \
cp -rf "./$UPD/cdrstats/"* . && \
cp /tmp/.env.cdrstats.bak .env && \
rm -rf "./$UPD" && \
rm -f cdrstats-update.zip && \
docker run --rm -v "$(pwd)/frontend:/app" -w /app node:20-alpine sh -c "npm ci && npm run build" && \
docker compose build --no-cache && \
docker compose up -d

The migration system automatically applies any database changes on startup. Your data is preserved.

Backup Before Upgrading

A daily backup cron job runs automatically (configured during installation). To create a manual backup before upgrading:

docker compose exec mongo mongodump --uri="mongodb://vodia_app:PASSWORD@localhost:27017/vodia_cdr?authSource=vodia_cdr" --archive=/tmp/backup.archive
docker compose cp mongo:/tmp/backup.archive ./backup-$(date +%Y%m%d).archive