Rollback

An older release does not start on a database migrated by a newer one. After starting the older tag, docker logs cdm lists the database copies it can use; pick the newest.

  1. Stop CDM:

    docker compose stop cdm
    
  2. Restore the copy. The current database is kept as cdm.db.newer:

    BACKUP=cdm.db.007   # the copy from the log
    docker run --rm -v cdm-data:/data -e BACKUP="$BACKUP" alpine sh -c \
      'cp /data/cdm.db /data/cdm.db.newer && rm -f /data/cdm.db-wal /data/cdm.db-shm && cp "/data/$BACKUP" /data/cdm.db'
    
  3. Set image: to the older tag and start it:

    docker compose up -d
    

Changes made since the update are lost.