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

ActiveLibrary

sam152/platform-backup
======================

v0.0.8(2y ago)0128MITPHPPHP &gt;=8.1

Since Feb 7Pushed 2y agoCompare

[ Source](https://github.com/Sam152/platform-backup)[ Packagist](https://packagist.org/packages/sam152/platform-backup)[ RSS](/packages/sam152-platform-backup/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (9)Used By (0)

Warning: Backups are only as good as the last time you tested a restoration. All backup systems should be monitored and tested regularly.

The script
----------

[](#the-script)

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 sam152/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:AWS\_REGION (Optional, defaults to us-east-1)
- Add composer install to .platform.app.yaml

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

```

- Copy 'example\_backup\_script.php' to './jobs/backup.php' and modify it for your needs.
- Deploy and test using: php ./jobs/backup.php
- Add cron task to .platform.app.yml

```
db_backup:
    spec: "0 0 * * *"
    cmd: "php ./jobs/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 Which was adapted from With inspiration from

Licence
-------

[](#licence)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56% 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 ~0 days

Total

8

Last Release

831d ago

PHP version history (2 changes)v0.0.1PHP &gt;=8.2

v0.0.8PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/1080ab116ed4117f1361595d2b55163f9144b204308c41c36ebdba7f5d01001e?d=identicon)[Sam152](/maintainers/Sam152)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[drevops/git-artifact

Package artifact from your codebase in CI and push it to a separate git repo.

2133.2k](/packages/drevops-git-artifact)

PHPackages © 2026

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