Python CLI tools for managing multiple Kopia repositories on Windows

Hi everyone,

I recently migrated to Kopia after considering well-documented issues with other solutions (like EaseUs, Veeam, Duplicati, etc). Kopia’s architecture is excellent, but I needed to implement proper 3-2-1 backups (3 copies, 2 media types, 1 offsite) which means backing up to multiple destinations simultaneously.

Since Kopia’s CLI works with one repository at a time, I built automation scripts to handle this:

kopia-helpers - https://github.com/rusty-art/kopia-helpers

What it does:

  • One command, multiple repositories — Backs up to local NAS, cloud storage, and external drive simultaneously from a single YAML config

  • Auto-scheduling — Registers with Windows Task Scheduler (configurable intervals, default 15 mins)

  • Health monitoring — Toast notifications if backups haven’t run

  • File search — Find files across all snapshots with Unix-style patterns (*.py, report*.pdf, etc.)

  • Status checking — Quick overview of all backup repositories and recent snapshots

Use case: If you follow 3-2-1 backup strategy with multiple destinations, this eliminates manual repository switching and ensures all backups run consistently. It also helps avoid having to manually / repeatedly type detailed Kopia command line arguments.

Currently Windows-only, but the Python code should be straightforward to adapt for Linux/macOS if anyone’s interested.

Would love feedback or suggestions!

1 Like

Update: Added rclone cloud sync support (for use with kopia)

Just pushed a new feature - kopia-helpers now supports automatic cloud syncing via rclone. You can add remote_destination_repo to any repository config to sync your local Kopia repo to OneDrive, Google Drive, S3, or any rclone-supported backend.

repositories:
  - name: mysrc
    local_destination_repo: D:/kopia-repos/mysrc
    remote_destination_repo: onedrive:backups/mysrc  # NEW
    ...

The sync runs automatically each hour (configurable). Health checks now also monitor cloud sync status and will alert you if syncs fail or become stale.

Other improvements:

  • Better pre-flight validation (checks for kopia/rclone availability with install instructions)

  • Proper exit codes for Task Scheduler integration

  • Defensive error handling - one repo failure won’t stop other repos from backing up

FYI - it would have to be used carefully as it does not take into account different sharding. For example S3 uses entirely flat repo structure vs sharded on local.

For kopia much safer is to use built in kopia repository sync-to

thanks for the info! I’ll look at the sync-to feature.

thanks. this is now fixed. scripts use kopia repository sync-to feature instead.

1 Like