X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/7edb3771717d15f7c36d8459fa12b3d6f76d7d9a..e32107a7fe79ce34f3bdf860410a6d5455efdca7:/bin/dump-yesterday?ds=sidebyside diff --git a/bin/dump-yesterday b/bin/dump-yesterday new file mode 100755 index 0000000..457792f --- /dev/null +++ b/bin/dump-yesterday @@ -0,0 +1,13 @@ +#!/bin/sh + +yesterday=`echo "print(os.date(\"%Y-%m-%d\",os.time()-24*60*60))" | /usr/bin/lua` + +logdb=`uci get weathermon.process.logdb` + +dumpdir=`uci get weathermon.process.archive_dir`/`echo "print(os.date(\"%Y/%m/%d\",os.time()-22*60*60))" | /usr/bin/lua` + +mkdir -p $dumpdir + +/usr/bin/weather-filter $logdb dump-compacted $yesterday $dumpdir + +sqlite3 $logdb "delete from log where time_stamp