b2upload pushes the content of a folder (and all its subdirectories) to backblaze
It will authenticate you, create the bucket if needed, and push only files that are not already present in the backblaze bucket.
_python 3.5+ only_
- install b2upload
pip install b2upload
- create a
.backblaze
file in your home directory
it should contain the following:
[backblaze] accountId = <your-account-id> applicationKey = <your-application-key>
- to upload all files and subfolders of the current directory
b2upload --bucket <bucket-name>
- to upload all files and subfolders of a specific directory
b2upload --bucket <bucket-name> --directory <absolute-path-to-dir>
For daily upload, assuming a virtual environment at $venv-path :
`
46 * * * * export PATH="$venv-path:$PATH" && b2upload --bucket <bucket> --directory $backup-dir > $backup-dir/cron.log && curl $monitoringendpoint
`