<commit_before># MAILTO=
# SHELL=/bin/bash
TS_LABEL=$(date +%FT%s)
PATH=/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:$HOME/.local/bin:$HOME/bin:$PATH:/usr/local/bin

[ ! -f docker-compose.yml ] && cd $HOME
docker-compose exec -T db psql -U postgres -c "SELECT pg_start_backup('$TS_LABEL', false);"
tar cjf ./backup/$TS_LABEL.tar.bz2 ./pgdata ; mv ./backup/$TS_LABEL.tar.bz2 ./archive/
docker-compose exec -T db psql -U postgres -c "SELECT pg_stop_backup();"<commit_msg>run full vacuuming before full DB backup...<commit_after># MAILTO=
# SHELL=/bin/bash
TS_LABEL=$(date +%FT%s)
PATH=/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:$HOME/.local/bin:$HOME/bin:$PATH:/usr/local/bin

[ ! -f docker-compose.yml ] && cd $HOME
docker-compose exec -T db psql -U postgres -c "VACUUM FULL ANALYZE; SELECT pg_start_backup('$TS_LABEL', false);"
tar cjf ./backup/$TS_LABEL.tar.bz2 ./pgdata ; mv ./backup/$TS_LABEL.tar.bz2 ./archive/
docker-compose exec -T db psql -U postgres -c "SELECT pg_stop_backup();"
{'fraction_non_alphanumeric': 0.19469026548672566, 'fraction_numerical': 0.003933136676499509, 'mean_word_length': 4.220512820512821, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '856430', 'n_tokens_mistral': 443, 'n_tokens_neox': 411, 'n_words': 84}