Archive monitor files

asepulveda

Joined
Jun 23, 2008
Messages
400
Likes
0
Points
0
#1
how can i archive my monitor files? i want to store monitoring files in folders per month, and erase automaticaly all folders olders than 2 months, that way i will only have the last two months monitor files.

thanks
 

trymes

Joined
Aug 19, 2009
Messages
228
Likes
0
Points
0
#2
Check out this thread I started on FreePBX.org a while back. http://www.freepbx.org/forum/freepbx/us ... -recording

The last post references a tool that should do what you are looking to do. (or at least part of it).

Otherwise, your needs sound simple enough to perform with a shell script in the /etc/cron.monthly or /etc/cron.daily folder.

Tom
 

asepulveda

Joined
Jun 23, 2008
Messages
400
Likes
0
Points
0
#3
I already trie that software , but it dosent work very well.

A cron may be the better idea, i will take a look in internet to get an idea of how to make it, any ideas?
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#4
Hi Augusto,
You can do a very simple script.

With whis command you delete monitor files older than 30 days, it is a one-liner, but Fireboard is doing its funny things:
Code:
find /var/spool/asterisk/monitor -mtime +30 | xargs rm -rf
Checkout "man find" there are some other time options you might find useful.


With whis command you cleate a directory using the current date:
Code:
mkdir /var/spool/asterisk/monitor/`date +%Y.%m.%d`
Checkout "man date" if you want to find some other options.
 

asepulveda

Joined
Jun 23, 2008
Messages
400
Likes
0
Points
0
#5
Great Ramoncio!!!! Thanks for your help, let me try this, i let you know my results

regards
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,913
Messages
130,917
Members
17,589
Latest member
cristian.saiz
Top