PHPackages                             withaspark/backblaze-sync - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. withaspark/backblaze-sync

ActiveProject[File &amp; Storage](/categories/file-storage)

withaspark/backblaze-sync
=========================

A script for syncing files to Backblaze B2.

v1.0.2(7y ago)09MITPHP

Since Apr 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/withaspark/BackblazeSync)[ Packagist](https://packagist.org/packages/withaspark/backblaze-sync)[ RSS](/packages/withaspark-backblaze-sync/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

withaspark/BackblazeSync
========================

[](#withasparkbackblazesync)

Install
-------

[](#install)

1. Install B2 CLI following [these instructions](https://www.backblaze.com/b2/docs/quick_command_line.html).
2. Authorize B2 CLI.
    1. Login to Backblaze UI.
    2. Visit buckets page and create new application key (or use existing).
    3. Get values of `applicationKeyId` and `applicationKey` from the `keyId` and displayed value, respectively.
    4. In terminal, authorize account by substituting for `applicationKeyId` and `applicationKey`. ```
        b2 authorize-account
        ```
3. Install package. ```
    composer require withaspark/BackblazeSync
    ```

Usage
-----

[](#usage)

### CLI

[](#cli)

```
path/to/backblaze_sync.php [-d|--dir  [-d|--dir  [...]]]
```

### Code

[](#code)

```
require __DIR__ . '/vendor/autoload.php';

$b2 = new withaspark\BackblazeSync\BackblazeSync($bucket, $local_dirs);

$existing = $b2->getExistingFiles(); // Get all files currently in bucket
$files = $b2->getFilesInDir(); // Get all files in local directory

$b2->deleteDuplicateRemoteFiles(); // Delete duplicate files in bucket

foreach ($files as $file) {
    $b2->upload($file); // Upload files if new
}

$b2->getUploadedCount(); // Get number of local files uploaded to B2 this run
$b2->getDeletedCount(); // Get number of remote files deleted from B2 this run
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

3

Last Release

2557d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/08ca31e94813e35a5b6d347105ac6f7d16a9fae5baeb3dd2697eee6e9381ac1d?d=identicon)[withaspark](/maintainers/withaspark)

---

Top Contributors

[![withaspark](https://avatars.githubusercontent.com/u/6511290?v=4)](https://github.com/withaspark "withaspark (3 commits)")

### Embed Badge

![Health badge](/badges/withaspark-backblaze-sync/health.svg)

```
[![Health](https://phpackages.com/badges/withaspark-backblaze-sync/health.svg)](https://phpackages.com/packages/withaspark-backblaze-sync)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M123](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
