Upgrading DB to 1.37.28 from 1.37.25 error

Current Development version likely to have breaking changes
Post Reply
KTownKnerd
Posts: 8
Joined: Sat Oct 31, 2020 1:41 am

Upgrading DB to 1.37.28 from 1.37.25 error

Post by KTownKnerd »

I went to update my system today after a few months and I received the following error:

Setting up zoneminder (1.37.40~20230428.25-bullseye) ...
detected systemd
Detected db service is mariadb.service
Checking for db
Db exists.
Updating permissions for user zmuser@localhost

Initiating database upgrade to version 1.37.40 from version 1.37.25

Upgrading database to version 1.37.40
Upgrading DB to 1.37.26 from 1.37.25

Database successfully upgraded to version 1.37.26.
Upgrading DB to 1.37.27 from 1.37.25

Database successfully upgraded to version 1.37.27.
Upgrading DB to 1.37.28 from 1.37.25
ERROR 1050 (42S01) at line 17: Table 'Snapshots_Events' already exists
Output: Checking for Snapshot_Events table
Checking for Snapshot_Events table
Command 'mysql --defaults-file=/etc/mysql/debian.cnf -hlocalhost zm < /usr/share/zoneminder/db/zm_update-1.37.28.sql' exited with status: 1
Error updating db.
dpkg: error processing package zoneminder (--configure):
installed zoneminder package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)

How should I proceed? I do have backups of my db if I need to restore an older db.

Thank you
dougmccrary
Posts: 1375
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Upgrading DB to 1.37.28 from 1.37.25 error

Post by dougmccrary »

Could be a bug, but I'd try zmupdate.pl manually first-off.
Post Reply