Backup all files in a given directory to a backblaze b2 bucket while respeciting gitignore rules.
# sync options
src_dir: './playground/src'
dst_bucket_name: "test-bucket"
# b2 app key
app_key_id: "4a5b6c7d8e9f"
app_key: "001b8e23c26ff6efb941e237deb182b9599a84bef7"
# global ignores
global_ignores:
- ".*node_modules$"
- ".*\\.git$"
- ".*\\.ipynb_checkpoints$"
Exclude any ipython notebook larger than 5MB.
size_limits:
# size in MB
".*\\.ipynb$": ">=5"
global_ignores:
# caching files
- ".*\\.data-\\d\\d\\d\\d-of-\\d\\d\\d\\d$"
# caching folders
- ".*node_modules$"
- ".*\\.git$"
- ".*\\.ipynb_checkpoints$"
- ".*venv$"
- ".*__pycache__$"
# ml-models
- ".*LibriSpeech$"
- ".*\\.h5$"
- ".*\\.pt$"
size_limits:
# size in MB
".*\\.ipynb$": ">=5"
python -m venv ./venv
source ./venv/bin/activate
pip install -r requirements.txt
vim config.yaml
python main.py sync --dry-run --verbose
mkdir logs
make sync
# shortcut to show-excluded-files of b2-backup
showex(){
/path/to/b2-backup/venv/bin/python /path/to/b2-backup/main.py show-excluded-files --start-dir "$1"
}
- unit tests from './playground'
- respecte nested rules
- upload full playground (ignore gitignore rules in that directory)
- size caps