Subversion Repositories ALCASAR

Rev

Rev 1218 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1218 Rev 1219
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
3
NOW=$(date +%G%m%d)
3
NOW=$(date +%G%m%d-%Hh%M)
4
DIR_SAVE="var/Save/logs/firwall/"
-
 
5
DIR_LOG="/var/log/nfsen/profiles-data/live/ipt_netflow"
4
DIR_LOG="/var/log/nfsen/profiles-data/live/ipt_netflow"
6
DIR_SAVE="/var/Save/logs/firewall"
5
DIR_SAVE="/var/Save/logs/firewall"
7
EXPIRE_DELAY=7
6
EXPIRE_DELAY=7
8
 
7
 
9
cd $DIR_SAVE
8
cd $DIR_LOG
10
find $DIR_LOG -mtime $EXPIRE_DELAY -name 'nfcapd.*' | xargs tar -czf tracability.log-$NOW.tar.gz;
9
find . -mtime 0 -mtime -$EXPIRE_DELAY -name 'nfcapd.[0-9]*' | xargs tar -czf $DIR_SAVE/tracability.log-$NOW.tar.gz;
11
 
10
 
12
exit 0
11
exit 0