Page 1 of 1

ZMAUDIT removed events after upgrade

Posted: Wed May 18, 2016 6:17 pm
by yzfr1
Hi everyone.

ZMAUDIT is removing my events and I can't figure out why.

I recently upgraded from 1.28 to 1.29.

Whole story. I have zoneminder running on Ubuntu 12.04. I wanted to move to a faster computer.

I set up a new system and went through the steps.
  1. Installed Ubuntu 16.04 and LAMP then followed the guide to install zoneminder from the wiki.
  2. Exported zm db from 1.28.
  3. Copied over all events to /var/cache/zoneminder/events from 1.28 computer to new 1.29 installation.
  4. chown -R www-data:www-data /var/cache/zoneminder/events
  5. Imported the new database mysql -uroot -p zm < zm.sql
  6. Ran zmupdate --migrate-events
  7. Ran zmupdate
  8. Logged into db and checked to make sure "USE_DEEP_STORAGE" is set to '1'.
Started zoneminder and all the events were there. Viewed a few events to make sure they played properly. Verified they all worked. Logged in about 30 minutes later and all events were gone.

This is a partial of the zmaudit.log

Code: Select all

05/17/2016 11:04:53.273516 zmaudit[24342].INF [Database event '1/15482' does not exist in filesystem]
05/17/2016 11:04:53.400063 zmaudit[24342].INF [deleting]
05/17/2016 11:04:54.016672 zmaudit[24342].INF [Database event '1/679' does not exist in filesystem]
05/17/2016 11:04:54.075084 zmaudit[24342].INF [deleting]
05/17/2016 11:04:54.517148 zmaudit[24342].INF [Database event '1/12302' does not exist in filesystem]
05/17/2016 11:04:54.592276 zmaudit[24342].INF [deleting]
05/17/2016 11:04:55.017805 zmaudit[24342].INF [Database event '1/15447' does not exist in filesystem]
05/17/2016 11:04:55.109664 zmaudit[24342].INF [deleting]
05/17/2016 11:04:55.359926 zmaudit[24342].INF [Database event '1/4482' does not exist in filesystem]
I have 'USE_DEEP_STORAGE' enabled. It looks like zmaudit is looking for the events when it is not using deep storage.

Here is my events directory

Code: Select all

user@user-domain:~$ ls -alh /var/cache/zoneminder/events/
total 36K
drwxr-xr-x 9 www-data www-data 4.0K May 17 13:35 .
drwxr-xr-x 5 www-data www-data 4.0K May 13 10:19 ..
drwxr-xr-x 6 www-data www-data 4.0K May 16 22:27 1
drwxr-xr-x 5 www-data www-data 4.0K May 16 22:35 2
drwxr-xr-x 5 www-data www-data 4.0K May 16 22:40 3
drwxr-xr-x 3 www-data www-data 4.0K May 16 22:40 4
drwxr-xr-x 5 www-data www-data 4.0K May 17 12:50 5
drwxr-xr-x 2 www-data www-data 4.0K May 17 13:35 7
drwxr-xr-x 3 www-data www-data 4.0K May 16 23:00 8
lrwxrwxrwx 1 www-data www-data    1 May 17 13:34 Driveway -> 5
lrwxrwxrwx 1 www-data www-data    1 May 17 13:34 Entry-Room-Cam -> 1
lrwxrwxrwx 1 www-data www-data    1 May 17 13:34 Foscam-1 -> 4
lrwxrwxrwx 1 www-data www-data    1 May 17 13:34 Living-Room -> 2
lrwxrwxrwx 1 www-data www-data    1 May 17 13:34 Patio-pool -> 3
lrwxrwxrwx 1 www-data www-data    1 May 17 13:35 test -> 8
lrwxrwxrwx 1 www-data www-data    1 May 17 13:35 trendnet -> 7
Any ideas??

Re: ZMAUDIT removed events after upgrade

Posted: Wed May 18, 2016 11:37 pm
by knight-of-ni
DEEP_STORAGE has been the default for ages.
If you find yourself starting over, try migrating to deep storage and verify the 1.28 system is running fine before you move the dB over to the new system.

In any case, the following information will be helpful in determining where the problem lies:
How did you install zoneminder 1.28 on the old system? package, from source, something else?
How did you install zoneminder 1.29 on the new system? package, from source, something else?

If the method by which you installed both versions don't match you can end up with a database containing settings which don't match what the new version expects.

What is the value of DIR_EVENTS under options?

Show the output of the following:

Code: Select all

ls -lh /usr/share/zoneminder
Show the output of the following:

Code: Select all

df -h
If you are using a dedicated disk or partition for your events folder then we need to know how you set that up.

Re: ZMAUDIT removed events after upgrade

Posted: Thu May 19, 2016 8:14 pm
by yzfr1
The old system (1.28) is still up and running and is definitely running with DEEP_STORAGE enabled.

Version 1.28 was installed via a package.
Version 1.29 was installed via a package.

DIR_EVENTS: events

Code: Select all

name@pc:~$ ls -lh /usr/share/zoneminder
total 72K
-rwxrwxr-x  1 www-data www-data  64K May 16 10:33 cambozola.jar
lrwxrwxrwx  1 www-data www-data   27 May 17 13:25 cgi-bin -> /usr/lib/zoneminder/cgi-bin
drwxr-xr-x  2 www-data www-data 4.0K May 15 21:13 db
lrwxrwxrwx  1 www-data www-data   28 May 17 12:45 events -> /var/cache/zoneminder/events
lrwxrwxrwx  1 www-data www-data   28 May 17 12:45 images -> /var/cache/zoneminder/images
lrwxrwxrwx  1 www-data www-data   26 May 17 12:44 temp -> /var/cache/zoneminder/temp
drwxr-xr-x 12 www-data www-data 4.0K May 17 13:22 www

Code: Select all

name@pc:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           795M  9.5M  786M   2% /run
/dev/sda1       909G   21G  843G   3% /
tmpfs           3.9G   15M  3.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
tmpfs           795M   48K  795M   1% /run/user/1000
There is not a dedicate partition or disk setup for events.

Thanks for you help.