Barkup
Barkup is a Python-based CLI tool for automating personal backups to local and cloud storage (Google Drive), with incremental, hash-checked copies and a config-driven workflow.
Motivation
Barkup started because I needed a reliable way to automatically back up the photos from my final year at university — and the ones I'll keep taking at conferences and elsewhere — to somewhere safe like Google Drive. I soon realized the same approach covers my eBooks and other files too. Barkup is the result: a small, config-driven CLI I built for myself, and my first personal project on boot.dev.
Quick Start
# Clone and install
git clone https://github.com/abu-bilaall/barkup
cd barkup
uv sync
# Scaffold a config, then edit it
uv run barkup init
# writes ~/.config/barkup/config.toml — set [general].sources and [local].destination, then run
# Run your first backup
uv run barkup run
# List what's backed up
uv run barkup list
Once installed, the barkup command is available via uv run barkup. You can also install the console script directly (uv pip install -e .), or install from PyPI once published (pip install barkup).
Usage
Configuration
Barkup loads and deep-merges config from these locations, lowest to highest priority:
/etc/barkup/config.toml(system)~/.config/barkup/config.toml(user; respectsXDG_CONFIG_HOME)./barkup.config.toml(current directory)--config <PATH>(CLI flag — highest priority)
A minimal config:
[general]
profile_name = "default"
dry_run = false
sources = ["/home/you/Documents", "/home/you/Pictures"]
compression = false
exclude = ["*.tmp", ".git", "node_modules"]
[local]
destination = "/mnt/backups"
exclude = [".tmp*"]
[[cloud_providers]]
provider = "google_drive"
enabled = false
# credentials_file = "/home/you/.barkup/google_drive.json"
# remote_folder = "Backups/Barkup"
[general]sets defaults forsources,compression, andexclude.[local]and[[cloud_providers]]override those defaults; theirexcludelists merge and deduplicate with the general list.compressionis a placeholder for the upcoming ZIP feature.- See
config.example.tomlin the repo for the full annotated example (including[advanced] temp_dir).
Commands
Global option: --config <PATH> (use a custom config file for any command).
| Command | Options | Description |
|---|---|---|
barkup init |
--force |
Create the default config at the user config path (overwrite with --force). |
barkup run |
--name <PROFILE>, --yes |
Run a backup. --name selects the profile; --yes is accepted for automation compatibility (no-op; dry-run is preview-only and never copies). |
barkup list |
--name <PROFILE> |
List backed-up files (original path, backup path, size, last backup). Filter by profile. |
barkup status |
--name <PROFILE> |
Show backup statistics for a profile (or all profiles). |
barkup verify |
--name <PROFILE> |
Recalculate hashes of the backup copies and compare with stored state; reports OK / missing / mismatched. Exits non-zero if any problem is found. |
barkup restore <path> |
--to <DEST>, --all, --name <PROFILE>, --yes |
Restore a single file (or --all for the whole set). --to restores to a custom location (preserves directory structure); --name selects the profile. Restoring onto an existing original requires --yes. --all requires --name. |
barkup profiles |
— | List all backup profiles with file counts, total size, and last-backup time. |
barkup prune |
--name <PROFILE>, --delete-backups, --yes |
Dry run lists orphan records; with --yes, remove DB records whose source files no longer exist. --delete-backups also deletes the backup files. |
Examples:
uv run barkup run --name default --yes
uv run barkup restore /mnt/backups/Documents/notes.txt --to ~/restore
uv run barkup restore --all --name default --to ~/restore-all
uv run barkup verify
How I use Barkup
I run Barkup unattended as a scheduled job (cron) rather than by hand. My setup:
barkup initto scaffold~/.config/barkup/config.toml.- Point
[general].sourcesat~/Picturesand~/Documents; set[local].destinationto an external drive; enable thegoogle_driveprovider with a credentials file and aremote_folder. - Run it daily via cron with
barkup run(the--yesflag is accepted for automation compatibility).
The config is the single source of truth, so adjust sources, destinations, and schedule to taste.
Contributing
-
Requires Python 3.12+ and
uv. -
Install dev dependencies and run tests:
uv sync uv run pytest -v
-
Lint/format:
uv run ruff check .anduv run black --check .. -
Run the app during development:
./main.shoruv run src/main.py. -
Workflow: feature branches are opened against
dev; PR titles follow[Feature NN] - <summary>(see.github/PULL_REQUEST_TEMPLATE.md). Keep changes focused and tests deterministic.
License
Released under the MIT License.
Metadata
Release files for barkup 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| barkup-0.2.1.tar.gz | 83.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| barkup-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 107.4 kB
Release files / barkup-0.2.1.tar.gz
| Download URL | barkup-0.2.1.tar.gz |
|---|---|
| Size | 83.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af75f3b517bb297f8ed68e3297d99cdcb63beec3e4f4c4cfbcc656ef6aea984d
|
|
BLAKE2b-256 checksum How to use checksums |
1d0b7b76678aec697555528364ffb3cd34caf2e47f27a8c8ca88aea9617303b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.
Transparency logRelease files / barkup-0.2.1-py3-none-any.whl
| Download URL | barkup-0.2.1-py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9512bd612eabc418410aff8306c82af455c2a1e3eb76f90a02db23b736cec5f
|
|
BLAKE2b-256 checksum How to use checksums |
76bd157a4bb55da14f6898034a8b9e732ac3c94484a1aa1ce760d7a0e196852a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.
Transparency log