This commit is contained in:
Oleg Sheynin 2023-11-19 12:10:10 -05:00
parent cb852e0438
commit dd7e1204b8
8 changed files with 36 additions and 1 deletions

7
cronjobs/cvtt/cloudstore Normal file
View File

@ -0,0 +1,7 @@
20 5 * * SAT /home/cvtt/prod/run/load_histdata.sh 2>&1 | /usr/bin/ts '[\%Y-\%m-\%d \%H:\%M:\%S]' >> /home/cvtt/prod/logs/$(date +\%Y\%m\%d_\%H\%M\%S).cron.eqt_hist_full_list.log
#
0 6 * * SUN /home/cvtt/prod/run/archive_logs.sh /home/cvtt/prod/logs 2>&1 | /usr/bin/ts '[\%Y-\%m-\%d \%H:\%M:\%S]' > /home/cvtt/prod/logs/$(date +\%Y\%m\%d).cronjob_log_archive.log
#
# T E S T
#----------------------------------------------------------------------
#----------------------------------------------------------------------

View File

@ -1 +1 @@
0.2.5
0.2.6

27
scripts/archive_yesterday_md.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
Python=/home/cvtt/.pyenv/python3.10-venv/bin/python3.10
RootDir=/home/cvtt/prod
export PYTHONPATH=${RootDir}
#dates=$(start=20231107; end=20231118; dt=; n=0; until [ "$dt" = "$end" ]; do ((n++)); dt=$(date -d "$start + $n days" +%Y%m%d); echo $dt; done)
yesterday=$(date -d "yesterday" +%Y%m%d)
Schemas="coinbase,bnbspot"
Cmd=
Cmd="${Python}"
Cmd="${Cmd} ${RootDir}/cvttpy/research/utils/archive_ts_md.py"
Cmd="${Cmd} --config=http://cloud16.cvtt.vpn:6789/apps/md_recorder"
Cmd="${Cmd} --db_credentials_key=TSDB_MD_CV1"
Cmd="${Cmd} --date=${yesterday}"
Cmd="${Cmd} --schemas=${Schemas}"
Cmd="${Cmd} --root_dir=/localdisk/cvtt/archive/md_archive"
Cmd="${Cmd} --format=SQLite"
# Cmd="${Cmd} --compress"
echo ${Cmd}
eval ${Cmd}

View File

@ -1,5 +1,6 @@
#!/bin/bash
# FOR cloud hosts with limited disk space - move to storage server
function usage {
echo "Usage: ${0} [<from_dir> default: /home/cvtt/prod/archive)]"