Hello.
I am running Zoneminder 1.25.0....
Can any one tell me simply how to reset the image folder numbers back to the beginning every day after i delete the folders??
To be more clear,,,,
I check and delete my Zoneminder image folders daily....
Every day the folder numbers continue to get bigger....
So if my last folder was 3007 today,,,,my beginning folder is now 3008 after the daily delete....
I would like the folders to start with the same numbers everyday....
So if i started with number 1 today,,,,after the delete i would like the beginning folder to be 1 again,,so it is the same
everyday....Is this a database reset issue??....
The reason for this is i have a cronjob script that pulls sets of these 10 minute image folders daily for another use,,,,
and i have to change the script daily to reflect the new folder numbers....Therefore having the folder numbers stay the same daily after i delete
saves this folder renaming in my script....
I would like to be able to have the folder numbers go back to the beginning without restarting zoneminder....
Thanks for any info....
Truly....
How can i reset image folder numbers daily??
-
- Posts: 16
- Joined: Sun Sep 19, 2010 1:09 am
Re: How can i reset image folder numbers daily??
timsdeepsky wrote:Hello.
I am running Zoneminder 1.25.0....
Can any one tell me simply how to reset the image folder numbers back to the beginning every day after i delete the folders??
To be more clear,,,,
I check and delete my Zoneminder image folders daily....
Every day the folder numbers continue to get bigger....
So if my last folder was 3007 today,,,,my beginning folder is now 3008 after the daily delete....
I would like the folders to start with the same numbers everyday....
So if i started with number 1 today,,,,after the delete i would like the beginning folder to be 1 again,,so it is the same
everyday....Is this a database reset issue??....
The reason for this is i have a cronjob script that pulls sets of these 10 minute image folders daily for another use,,,,
and i have to change the script daily to reflect the new folder numbers....Therefore having the folder numbers stay the same daily after i delete
saves this folder renaming in my script....
I would like to be able to have the folder numbers go back to the beginning without restarting zoneminder....
Thanks for any info....
Truly....
Hello timsdeepsky,
Youll have to write a script that truncates the ZoneMinder event table.
Most likely you can run this script on cron.
Goodluck, Christo
-
- Posts: 16
- Joined: Sun Sep 19, 2010 1:09 am
Re: How can i reset image folder numbers daily??
Thanks Christo,,
I am able to use phpmyadmin temporarily to log in and truncate the particular table daily....This fixes my issue temporarily until i figure out how to write and execute in cron....Thanks again....
I am able to use phpmyadmin temporarily to log in and truncate the particular table daily....This fixes my issue temporarily until i figure out how to write and execute
Code: Select all
TRUNCATE TABLE tablename
Re: How can i reset image folder numbers daily??
timsdeepsky wrote:Thanks Christo,,
I am able to use phpmyadmin temporarily to log in and truncate the particular table daily....This fixes my issue temporarily until i figure out how to write and executein cron....Thanks again....Code: Select all
TRUNCATE TABLE tablename
Hello tim,
Remember that this script has to hold your msql user and password and youll have to point out the database that you want to use.
Depending if your system is very busy... youll have to prevent your ZoneMinder from writing to the table (events) that is beeing truncated. Best solution is to (temperary) stop ZoneMinder. (zm service stop)
If you look for some scripts within this forum, youll find what's needed!
Goodluck, Christo