<commit_before>#!/bin/bash

S3_BUCKET=$1
#CRON_MINUTE=$2
#CRON_HOUR=$3
#CRON_MONTHDAY=$4
#CRON_MONTH=$5
#CRON_WEEKDAY=$6

sudo pip install s3cmd

# copy over backup script and config, update s3 bucket in config.
cd docker-stack/db/postgres-backup/
sudo cp pg_backup.config /media/data/postgres/backup/pg_backup.config
sudo cp pg_backup_rotated_new.sh /media/data/postgres/backup/pg_backup_rotated_new.sh
sudo chmod 0755 /media/data/postgres/backup/pg_backup_rotated_new.sh
sudo sed "s/^BUCKET_NAME=.*/BUCKET_NAME=${S3_BUCKET}/" pg_backup.config

# add cron job to run the backup daily
#sudo (crontab -u postgres -l 2>/dev/null; echo "$1 $2 $3 $4 $5 /path/to/job -with args") | crontab -u postgres -
(sudo crontab -u postgres -l 2>/dev/null; echo "01 04  *   *   *     /media/data/postgres/backup/pg_backup_rotated_new.sh -c /media/data/postgres/backup/pg_backup.config") | sudo crontab -u postgres -

# jenkins setup
<commit_msg>change relative to absolute path<commit_after>#!/bin/bash

S3_BUCKET=$1
#CRON_MINUTE=$2
#CRON_HOUR=$3
#CRON_MONTHDAY=$4
#CRON_MONTH=$5
#CRON_WEEKDAY=$6

sudo pip install s3cmd

# copy over backup script and config, update s3 bucket in config.
cd ~/docker-stack/db/postgres-backup/
sudo cp pg_backup.config /media/data/postgres/backup/pg_backup.config
sudo cp pg_backup_rotated_new.sh /media/data/postgres/backup/pg_backup_rotated_new.sh
sudo chmod 0755 /media/data/postgres/backup/pg_backup_rotated_new.sh
sudo sed "s/^BUCKET_NAME=.*/BUCKET_NAME=${S3_BUCKET}/" pg_backup.config

# add cron job to run the backup daily
#sudo (crontab -u postgres -l 2>/dev/null; echo "$1 $2 $3 $4 $5 /path/to/job -with args") | crontab -u postgres -
(sudo crontab -u postgres -l 2>/dev/null; echo "01 04  *   *   *     /media/data/postgres/backup/pg_backup_rotated_new.sh -c /media/data/postgres/backup/pg_backup.config") | sudo crontab -u postgres -

# jenkins setup

{'fraction_non_alphanumeric': 0.12879191059073974, 'fraction_numerical': 0.026609898882384245, 'mean_word_length': 4.433526011560693, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1347460', 'n_tokens_mistral': 779, 'n_tokens_neox': 744, 'n_words': 172}