A python script to back up Blink video footage to your local drive, from the cloud.
Complete installation, then setup a daily cron job that runs run_cron.py at least once a day for continuous back-up. Make sure to set environment variables for your Blink login.
Set username and password (can be done in startup profile, or passed-through during the run command):
export BLINK_USERNAME=<YOUR_USERNAME>
export BLINK_PASSWORD=<YOUR_PASSWORD>Set 2FA automation tokens (Outlook client supported only at the moment). This also requires a o365_token.txt in the root directory of the project as per the o365 library. See here for instructions on how to generate the o365_token.txt file.
export OUTLOOK_CLIENT_ID=<YOUR_OUTLOOK_CLIENT_ID>
export OUTLOOK_CLIENT_SECRET=<YOUR_OUTLOOK_CLIENT_SECRET>Then run your cron job on :
# Example for every 12 hours
CRON EXPRESSION: 0 0 */12 ? * *
CRON JOB: poetry run python run_cron.py
The downloads will be sent to ./video_backup unless otherwise specified with -f <DIRECTORY> running run_cron.py.
The script allows you to download all footage off the cloud. Complete installation, then do the following.
Set username and password (can be done in startup profile, or passed-through during the run command):
export BLINK_USERNAME=<YOUR_USERNAME>
export BLINK_PASSWORD=<YOUR_PASSWORD>Set 2FA automation tokens (Outlook client supported only at the moment). This also requires a o365_token.txt in the root directory of the project as per the o365 library. See here for instructions on how to generate the o365_token.txt file.
export OUTLOOK_CLIENT_ID=<YOUR_OUTLOOK_CLIENT_ID>
export OUTLOOK_CLIENT_SECRET=<YOUR_OUTLOOK_CLIENT_SECRET>Run run_cron.py
poetry run python run_cron.py --allThe downloads will be sent to ./video_backup unless otherwise specified with -f <DIRECTORY> running run_cron.py.
Requires python 3.7.9:
pyenv install 3.7.9
pyenv virtualenv 3.7.9 watcher
pyenv local watcher
poetry installComplete installation, then install pre-commit.
poetry run pre-commit installThis project uses pytest.
poetry run pytest