Clean up old FAX

Discussion in 'General' started by itjumper, Nov 16, 2009.

  1. itjumper

    Joined:
    Jul 22, 2008
    Messages:
    81
    Likes Received:
    0
    How can I clean up (remove) old faxes from elastix ?

    I have deleted some faxes in Fax Visor, but the tif files are still there.

    I would like to run a scheduled job to remove fax older than a certain age from Fax Visor and /var/spool/hylafax/recvq

    Thanks
     
  2. johnme

    Joined:
    Nov 28, 2008
    Messages:
    148
    Likes Received:
    0
    Hi



    create a file in /etc/cron.daily/ with filename monitor_cleanup and put in it:

    #!/bin/sh
    /usr/bin/find /var/spool/asterisk/monitor/ -maxdepth 1 -type f -mtime +30 | /usr/bin/xargs /bin/rm -f >/dev/null 2>&1

    This file will delete all monitor files that are older than 30 days. So change the path change the days give it a new name and it will delete everything older than 30 days in the new location.
    Be carefull!!!



    Hope i help

    John
     
  3. itjumper

    Joined:
    Jul 22, 2008
    Messages:
    81
    Likes Received:
    0
    I don't see any fax (tiff) in that folder. The folder seems to contain voice recordings. I found the fax in /var/spool/hylafax/recvq though.

    I need to clean up recordings as well.

    Thanks for your script.
     
  4. johnme

    Joined:
    Nov 28, 2008
    Messages:
    148
    Likes Received:
    0
    Hi

    As i sayed chnge the path in the script to /var/spool/hylafax/recvq and it will delete the tiff files

    Bye
     

Share This Page