By default, OpenTSDB stores two weeks of metrics. Based on your requirements, you can change metric retention period.
$min $hour * * * $OTSDB_HOME/bin/tsdb_cluster_mgmt.sh -purgeData >> $OTSDB_HOME/var/log/opentsdb/purgeData.log 2>&1 /opt/mapr/opentsdb/opentsdb-<version>/bin/tsdb_cluster_mgmt.sh
file.'2 weeks ago' to the new
retention
period.$OT_HOME/bin/tsdb scan --delete 2000/01/01 $(date --date='2 weeks ago' +'%Y/%m/%d') sum $metric$OT_HOME/bin/tsdb scan --delete 2000/01/01 $(date --date='2 days ago' +'%Y/%m/%d') sum $metric