[Dxspider-support] how delete data

Jan cluster at pa4jj.nl
Sat May 21 11:01:49 BST 2022


Hello

I recently upgraded my dxspider to ver 1.57 build 441.

I have allways used the script below to remove old data in 
/spider/data/log, /spider/data/debug and /spider /data spots.

I know that the data is now in /spider/local_data/spots (etc) so I have 
this in the script:

#!/bin/sh We need to delete old files.
spiderdir="/spider/local_data/spots/2022" if [ -n "$spiderdir" ] && [ -d
"$spiderdir" ]; then
# only keep three days' depth of these
find "$spiderdir" -type f -mtime +3 -exec rm {} \; fi
spiderdir="/spider/local_data/debug/2022" if [ -n "$spiderdir" ] && [ -d
"$spiderdir" ]; then
# only keep a couple of day's depth of these
find "$spiderdir" -type f -mtime +2 -exec rm {} \; fi
spiderdir="/spider/local_data/log/2022" if [ -n "$spiderdir" ] && [ -d
"$spiderdir" ]; then
# only keep a week's depth of these
find "$spiderdir" -type f -mtime +7 -exec rm {} \;
fi

The script is in /etc/cron.daily/spider and the rights are chmod a+x spider

The script for cleaning up is :


#!/bin/sh
# We need to delete old files.
logdir="/var/log"
rm $logdir/*.gz

It is in etc/cron.weekly/clear_log.sh and the rights are chmod a+x 
clear_log.sh

My question is is this the right way to do it?


73
Jan
PA4JJ
______________________________________________________

My dxspider clusters running 24/7 on a raspberry pi 2
pa4jj-2 telnet 77.174.195.163 port 7300
pa4jj-3 telnet 77.174.195.163 port 7388
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.tobit.co.uk/pipermail/dxspider-support/attachments/20220521/58d03913/attachment.htm>


More information about the Dxspider-support mailing list