PHPackages                             benjy/platform-backup - 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. benjy/platform-backup

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

benjy/platform-backup
=====================

64.6k1PHP

Since Jul 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/benjy/platform-backup)[ Packagist](https://packagist.org/packages/benjy/platform-backup)[ RSS](/packages/benjy-platform-backup/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Automated backup script that pulls the database, compresses, and syncs to an S3 bucket. Designed for Platform.sh

Install
-------

[](#install)

You can either clone this repo and use as its own project or you can require it as a dependency into your existing project.

`composer require benjy/platform-backup`

Setup
-----

[](#setup)

- composer install
- Create IAM user with write access to a S3 bucket.
- Add backups directory to .platform.app.yaml

```
mounts:
    "/backups": "shared:files/backups"

```

- Add environmental variables in Platform.sh. Be sure to add the "env:" prefix.

    - env:AWS\_ACCESS\_KEY\_ID
    - env:AWS\_SECRET\_ACCESS\_KEY
    - env:S3\_BUCKET (The name of the bucket you created)
    - env:LOGGLY\_TOKEN (Get from loggly &gt; source setup &gt; tokens)
    - env:AWS\_REGION (Optional, defaults to us-east-1)
    - env:PUBLIC\_FILES\_DIRECTORY (optional: If added use, full path \[e.g. /app/app/sites/default/files\])
    - env:PRIVATE\_FILES\_DIRECTORY (optional: If added use, full path \[e.g. /app/private\])
- Add composer install to .platform.app.yaml

```
hooks:
    build: |
        composer install --working-dir=./jobs

```

- Deploy and test using: php ./jobs/db\_backup.php
- Add cron task to .platform.app.yml

```
db_backup:
    spec: "0 0 * * *"
    cmd: "php ./jobs/db_backup.php"

```

Note, you might have to update the cmd to point to a different location depending on how you installed.

#### Credits

[](#credits)

Adapted from

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6779957256d5d5129ea3c73e3c7e14c197eab6d3adcf9797203bf7c5b6a194a5?d=identicon)[benjy](/maintainers/benjy)

---

Top Contributors

[![benjy](https://avatars.githubusercontent.com/u/863137?v=4)](https://github.com/benjy "benjy (11 commits)")

### Embed Badge

![Health badge](/badges/benjy-platform-backup/health.svg)

```
[![Health](https://phpackages.com/badges/benjy-platform-backup/health.svg)](https://phpackages.com/packages/benjy-platform-backup)
```

PHPackages © 2026

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