Pruning stale events after a database restore

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
rilny
Posts: 15
Joined: Mon Jan 18, 2021 10:00 pm

Pruning stale events after a database restore

Post by rilny »

I moved my ZM installation to a new server and did a dump/restore of the database but didn't bring over the old files. Really I just wanted to restore the configuration & source definitions. This worked fine, but now it's confused about the disk space usage.

There was an earlier post in the forums where somebody said it's supposed to detect this situation and clean up the missing events, but I don't think this is happening for me. All of the old events are still in the database even though the files aren't there. Is there a way I can force it to remove all of the events that aren't present on disk? Behold:
storage.png
storage.png (23.33 KiB) Viewed 388 times
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Pruning stale events after a database restore

Post by Magic919 »

Run zmaudit to do it.
-
rilny
Posts: 15
Joined: Mon Jan 18, 2021 10:00 pm

Re: Pruning stale events after a database restore

Post by rilny »

That worked, thanks!
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Pruning stale events after a database restore

Post by Magic919 »

Good to hear.
-
Post Reply