auanasgheps / snapraid-aio-script

The definitive all-in-one SnapRAID script on Linux. Diff, sync, scrub are things of the past. Manage SnapRAID and much, much more!
GNU General Public License v3.0
225 stars 36 forks source link

Add "raw" logs #59

Closed firasdib closed 1 year ago

firasdib commented 1 year ago

I found myself unsure of what was happening during an extended snapraid sync since there is no insight into the process while it's running, unless you have the stdout pipe. I was thinking, would it be possible to add a "raw" log entry somewhere, so you can tail it to see what the current sync/scrub progress is?

Thanks

auanasgheps commented 1 year ago

By default every run produces a verbose log in /tmp on the server, but it is overridden every time you run the script. You can change this by using the retention days feature.

RETENTION_DAYS=0
SNAPRAID_LOG_DIR="$HOME"

I hope this answers your question!

firasdib commented 1 year ago

There is no progress in this log, at least not for me. And i don’t see the files being synced either. Vänliga hälsningar / Best regards,Firas DibOn 13 Jun 2023, at 10:32, Oliver Cervera @.***> wrote: By default every run produces a verbose log in /tmp on the server, but it is overridden every time you run the script. You can change this by using the retention days feature. RETENTION_DAYS=0 SNAPRAID_LOG_DIR="$HOME"

I hope this answers your question!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

tehniemer commented 1 year ago

I think what @firasdib is looking for, and please correct me if I'm wrong, is an indication of the progress of current step in the script. Essentially this:

image

I see the use for this as an analysis tool, maybe there's a way to add this line to the script logs so that it's continually overwritten as to not pollute it.

firasdib commented 1 year ago

Correct. It would be nice to have this info (along with the files being synced from the diff output) in the "raw" logs. These wont be emailed to you, but they serve as history (and progress info).

auanasgheps commented 1 year ago

Hi guys to be honest I have no idea how to implement this feature, so in case you know, contributions are welcome.

firasdib commented 1 year ago

What happens if you pipe everything to a file using 2>&1?Vänliga hälsningar / Best regards,Firas DibOn 19 Jul 2023, at 10:07, Oliver Cervera @.***> wrote: Hi guys to be honest I have no idea how to implement this feature, so in case you know, contributions are welcome.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>