Add more logs for cron file run and comment out bashrc line that causes python script error of not being able to find the env variables.
For the last 3-4 weeks i have was checking for the backup notification on Wednesday to arrive on discord and they didn't arrive 😄
s3_bucket_name = os.environ["BACKUP_S3_BUCKET"]
File "/usr/lib/python3.8/os.py", line 675, in __getitem__
raise KeyError(key) from None
KeyError: 'BACKUP_S3_BUCKET'
The script was failing to find env variable because [ -z "$PS1" ] && return ensured the sourcing of bashrc didn't do anything. So fix was to comment it. In the process I found probably having the last cron job run log in the kosa logs directory can also help in troubleshooting issues related to s3 backups.
This Wednesday, the notifications did arrive, finally😀
Add more logs for cron file run and comment out bashrc line that causes python script error of not being able to find the env variables.
For the last 3-4 weeks i have was checking for the backup notification on Wednesday to arrive on discord and they didn't arrive 😄
The script was failing to find env variable because
[ -z "$PS1" ] && return
ensured the sourcing of bashrc didn't do anything. So fix was to comment it. In the process I found probably having the last cron job run log in the kosa logs directory can also help in troubleshooting issues related to s3 backups.This Wednesday, the notifications did arrive, finally😀
So, changes are tested and verified to work!