The "Logs" folder is using 60% of my recording drive. Safe to remove the content?

I don't think this is really relevant but my server is running on Windows. Just FYI.

Currently, D:\DVR\Logs\ is using 410 GB, which is 60% of the whole D:\ drive.

I would think it should be safe to remove the content of this folder since it doesn't affect the database.

Can anybody confirm?

1 Like

I delete mine now every now and then.

1 Like

Thanks for your quick reply. I thought it should be safe to clear it.

I wish there was an option to automatically delete a log file if the recording is successful (only keep log files in case of corrupted recordings).

2 Likes

If you check you'll see that Windows is reporting the size of what the video.mpg symlink in the Logs/comskip folders point to (the actual recording file). There are actually no video.mpg files there, Windows is just following the symlink and reporting the size of the recording it points to that exists in other folders.

Thank you for the explanation.
Actually, the Logs/comskip folder is not much of a concern at this time because it is not taking much room compared to Logs/recording:

It's Logs/recording that is taking all the space with 6,116 folders that each contain a file called recording.log:

So I guess it's time for me to clean up. :laughing:

Ahh, the debug recording logs.

Before someone decides those debug recording logs aren't needed, they should read the rest of eric's post.

And know when Channels DVR rewrites timestamps

2 Likes

Thanks for all the details.
For now, I will just clear the log files from last year to start and go from there.

I just created a little script that runs once a week that deletes everything older than 7 days. The logs are only needed if there is an issue, and if you haven't had one in the past week, then they are good to go.

1 Like

I'm running Channels DVR on an old MacBook with an external 4TB drive. My Logs folder is taking up about 40GB of space. Can I delete the two subfolders inside Logs called "comskip" and "recording"? Also there is a folder named "Streaming" taking up another 8GB. Any advice would be appreciated.

Sounds like it could be useful to lots of us, would you mind sharing the script?

Perhaps it’s something @bnhf can consider including in OliveTin.

I don't know if this is a good fit for OliveTin, but here's the little PowerShell command I run:

ForFiles /p "C:\{YOUR CHANNELS DVR PATH HERE}\Logs\recording" /s /d -7 /c "cmd /c del /q @file"

I just put that in Task Scheduler and set it up to run everyday at 3am. It's not super universal for people using Macs or Dockers or whatnot.

I'm assuming you already read this post above yours The "Logs" folder is using 60% of my recording drive. Safe to remove the content? - #6 by chDVRuser

Rather than repeat a topic here, see Channels Streaming Folders

Thanks for the reply. I deleted all files and folders inside the "recording" subfolder, but I have no idea if I can delete the contents of the "comskip" subfolder inside of Logs.

The only reason you would want to keep the comskip folder contents are if you plan on viewing the comskip log (video.log) for your recordings or taking advantage of any of the comskip generated output files in there. If you delete them and need one of the files later, just re-comskip the recording and they'll be generated again.

I consider the size relatively small. Here's an example from one of my four servers.
Capture

Comskip logs are also used for the commercial editor

1 Like

Thanks, didn't realize that!

I would not touch the Comskip folder ... these should be automatically removed when deleting the file ? or am I wrong in thinking they are ?

1 Like

Yes, once the recording is deleted, its comskip folder will be deleted along with its Streaming/m3u8 folder.

1 Like

On Window I use Robocopy ....

robocopy "Y:\ChannelsDVR\Logs" "C:\TempDir" /E /xd "Y:\ChannelsDVR\Logs\comskip" /move /minage:7
rmdir /s /q "C:\TempDir"

I think the answer to if this is a good fit for OliveTin lies in whether or not most people have their "dvr" folder setup as a network share. Or maybe another way to look at it is that if someone wants to use an OliveTin Action for this, they'd need to setup that folder as a share.

Portainer makes it pretty easy to create a volume that maps to a CIFS (SMB) or NFS share, and then that volume can be bound to a directory in OliveTin. With that in place, various maintenance scripts including the deletion of logs would pretty easy, and platform independent.

Does that appeal?