Skip to content

niparis/backblaze-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

B2 upload - a script to backup a folder to BackBlaze

Code Health

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

Set up

  • 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>

Usage

  • 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>

Example crontab --------------

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`

About

backup a directory on backblaze

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages