Page 1 of 1

Pruning stale events after a database restore

Posted: Mon May 09, 2022 3:14 pm
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 517 times

Re: Pruning stale events after a database restore

Posted: Mon May 09, 2022 3:56 pm
by Magic919
Run zmaudit to do it.

Re: Pruning stale events after a database restore

Posted: Tue May 10, 2022 7:06 pm
by rilny
That worked, thanks!

Re: Pruning stale events after a database restore

Posted: Tue May 10, 2022 7:31 pm
by Magic919
Good to hear.