• Saving inbound packets

    From Alan Ianson@1:153/757 to All on Sat Jun 26 03:05:18 2021
    Hello All,

    There are times I would like to look at an inbound packet after tossing when there are unexpected errors or ???.

    Is there a way to keep inbound packets after tossing to inspect later?

    Ttyl :-),
    Al

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757)
  • From Oli@2:280/464.47 to Alan Ianson on Sat Jun 26 22:06:12 2021
    Alan wrote (2021-06-26):

    Hello All,

    There are times I would like to look at an inbound packet after tossing when there are unexpected errors or ???.

    Is there a way to keep inbound packets after tossing to inspect later?

    make a copy before tossing?

    ---
    * Origin: %p%s%s%s%s%n (2:280/464.47)
  • From Alan Ianson@1:153/757 to Oli on Sat Jun 26 14:19:40 2021
    Hello Oli,

    Is there a way to keep inbound packets after tossing to inspect
    later?

    make a copy before tossing?

    That's what I am doing now. What a mess of stuff.. ;)

    I am copying packets and bundles into a backup directory. A rather crude cp command. I'm not sure what is going to happen with filename collisions.

    I was thinking others may have come up with a good way to accomplish that.

    Ttyl :-),
    Al

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757)
  • From Tommi Koivula@2:221/360 to Alan Ianson on Sun Jun 27 09:10:16 2021
    Hi Alan.

    26 Jun 21 14:19:40, you wrote to Oli:

    Is there a way to keep inbound packets after tossing to inspect
    later?

    make a copy before tossing?

    That's what I am doing now. What a mess of stuff.. ;)

    I am copying packets and bundles into a backup directory. A rather crude cp command. I'm not
    sure what is going to happen with filename collisions.

    From HPT you can use "afterunpack". But it may only be used for arcmail?

    === Cut ===
    3.2.2 AfterUnpack

    Syntax:
    afterUnpack <string>
    Example:
    afterUnpack pktpack /home/fido/in.tmp/*.pkt

    This <string> is executed after unpacking arcmail bundle. You may process your pkt files in tempInbound directory with external utility.

    This statement cannot be repeated.
    === Cut ===

    I was thinking others may have come up with a good way to accomplish that.

    I'm using exec in binkd. :)

    === Cut ===
    exec "4os2.exe /c d:\\binkd\\talteen.cmd *F *A0" *.su? *.mo? *.tu? *.we? *.th? *.fr? *.sa? *.pkt
    === Cut ===

    === Cut ===
    echo x xx:xx:xx talteen...
    set npolku=%@replace[/,_,%2]
    set npolku=%@replace[:,_,%npolku]
    set npolku=%@replace[@,_,%npolku]
    set npolku=%@replace[.,_,%npolku]
    if not exist i:\tmp\pkt\jemma\%_date%\%npolku\ md /s i:\tmp\pkt\jemma\%_date%\%npolku\
    copy /equ "%1" i:\tmp\pkt\jemma\%_date%\%npolku\
    exit
    === Cut ===

    'Tommi

    ---
    * Origin: rbb.fidonet.fi (2:221/360)
  • From Tommi Koivula@2:221/360 to Alan Ianson on Sun Jun 27 09:29:04 2021
    Hi Alan.

    26 Jun 21 14:19:40, you wrote to Oli:

    I am copying packets and bundles into a backup directory. A rather crude cp command. I'm not
    sure what is going to happen with filename collisions.

    You could set your mailer inbound to some path that your tosser does not see. Then in a tossing script first copy files to backup, then move them to your tosser inbound and make sure nothing gets overwritten.

    'Tommi

    ---
    * Origin: rbb.fidonet.fi (2:221/360)
  • From Kai Richter@2:240/77 to Alan Ianson on Sun Jun 27 12:51:58 2021
    Hello Alan!

    26 Jun 21, Alan Ianson wrote to Oli:

    That's what I am doing now. What a mess of stuff.. ;)

    It does it's job.

    I am copying packets and bundles into a backup directory. A rather
    crude cp command. I'm not sure what is going to happen with filename collisions.

    I tried many backup strategies but in the end one of my teachers was right: A file you haven't touched for 6 month will never be touched again. Well, i don't agree fully. The goal for personal data like photo gallery and videos is for a review after years. But we are talking about in-process data. It aims to protect data loss during processing failures.

    Thanks to the dupe detection of the tosser you could throw in old and new data from the backup and re-process it.

    I was thinking others may have come up with a good way to accomplish
    that.

    For tossing backups i do use a simple

    cp -au <inbound> <backup-destination>
    hpt toss

    Filename collisions will happen with nodediff files. A diff of e.g. *.a32 could be the diff 032, 132 or 232. That's why i switched to uncompressed diff backups. Because of the counter restart every year i have yearly backup directories.

    diff_path=<inbound>
    arch_path=<backup.for.diffs>
    log_file=backup.log

    # Check for yearly archive directory and create if not exist
    [ -d $arch_path/`date +%Y` ] || mkdir -p $arch_path/`date +%Y`
    cd $arch_path/`date +%Y`

    # detect nodediffs at inbound - upper lower arc
    for fdiff in $diff_path/[nN][oO][dD][eE][dD][iI][fF][fF].[aA]* ; do
    if [ -s $fdiff ] ; then
    echo `date` $fdiff >> $log_file
    arc ew $fdiff
    fi
    done

    The backquote is the magic job there. Please read "Command Substitution" in your shell manual. There is the form $(command) with a bit different behavior.

    If you want to have monthly backups check "man date" for the other format strings, there are many.

    Regards

    Kai

    --- GoldED+/LNX 1.1.4.7
    * Origin: Monobox (2:240/77)