PHPackages                             littlegiant/silverstripe-spindb - 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. [Database &amp; ORM](/categories/database)
4. /
5. littlegiant/silverstripe-spindb

ActiveSilverstripe-vendormodule[Database &amp; ORM](/categories/database)

littlegiant/silverstripe-spindb
===============================

Backup DB periodically and backup to AWS S3 storage with rotation

1.0.0(7y ago)13.2k1[2 issues](https://github.com/isobar-nz/silverstripe-spindb/issues)BSD-3-ClausePHP

Since Apr 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/isobar-nz/silverstripe-spindb)[ Packagist](https://packagist.org/packages/littlegiant/silverstripe-spindb)[ RSS](/packages/littlegiant-silverstripe-spindb/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)Dependencies (6)Versions (11)Used By (0)

Spin DB
-------

[](#spin-db)

Ensures regular DB backup and off-site storage via AWS S3. Useful for when you have a client you want to keep.

A cron task will regularly create DB backups of your website, archive the files, and upload them to S3. The module will also rotate your backups to ensure that it retains a larger number of recently created backups, and fewer of older backups, to ensure that space is not unnecessarily consumed.

The default schedule is:

- Backup every night at 2am
- Keeps daily backups for 7 days
- Keeps monthly backups for 4 months
- Keeps yearly backups each year

This default schedule can be tweaked via config

Use this module if:
-------------------

[](#use-this-module-if)

- You are running SilverStripe 4.0 and above
- You have a small to medium website
- Self-hosting on a non-PaaS provider
- Have access to an AWS bucket
- Don't want to baby-sit backups

Don't use this module if:
-------------------------

[](#dont-use-this-module-if)

- Your web server has limited disk space
- Your website has a huge database
- You need professional archival / SLA storage and backup requirements
- Late-night performance degradation could cause significant issues

Installation
------------

[](#installation)

Install your module into your silverstripe project

```
composer require littlegiant/silverstripe-spindb
```

AWS Configuration
-----------------

[](#aws-configuration)

Configure access to your AWS bucket. The below environment variables should be configured either directly as env on your server, or in `.env` in your project root.

```
SPINDB_AWS_S3_BUCKET=""
SPINDB_AWS_REGION="ap-southeast-2" # Or your aws region
SPINDB_AWS_ACCESS_KEY_ID=""
SPINDB_AWS_SECRET_ACCESS_KEY=""
```

If you want to authenticate via your local AWS credentials (Stored in `~/.aws/credentials`) then you can provide a profile name instead.

```
SPINDB_AWS_S3_BUCKET=""
SPINDB_AWS_REGION="ap-southeast-2" # Or your aws region
SPINDB_AWS_PROFILE="profilename" # The profile name containing your authentication credentials. Can be `default`
```

If you are running this site on AWS you can provide access via IAM instead, and you only need to specify the following. This is the bare minimum configuration necessary for the module to run.

```
SPINDB_AWS_S3_BUCKET=""
SPINDB_AWS_REGION="ap-southeast-2" # Or your aws region
```

By default DB backups are written to the `{baseurl}/db_{date}{ext}` path within the bucket, but this can be configured.

```
SPINDB_PATH="{baseurl}/db_{date}{ext}"
```

Supported vars:

- `{baseurl}` Value of `BASE_URL` var
- `{date}` Date the archive was created (ISO\_8601)
- `{time}` Time the archive was created (ISO\_8601)
- `{ext}` File extension created, e.g. `.sql` or `.zip` depending on archive method

Schedule / rotation configuration
---------------------------------

[](#schedule--rotation-configuration)

You can configure the time of day that the task occurs, or even how frequently it runs.

```
SPINDB_SCHEDULE="0 2 * * *" # Every night at 2am
```

If you want to backup less frequently you can adjust the day

```
SPINDB_SCHEDULE="0 2 */2 * *" # Every second night at 2am
```

You can configure the number of daily, weekly, monthly, and yearly backups

For each of the below, 0 means keep no backups, -1 means keep unlimited backups (use with care)

```
SPINDB_KEEP_DAILY="7" # Default to 1 week of backups
SPINDB_KEEP_WEEKLY="0" # Default to no weekly backups
SPINDB_KEEP_WEEKLY_DAY="0" # If keeping weekly backups set the day of the week to keep (0/7 = sunday, 1 = monday, etc).
SPINDB_KEEP_MONTHLY="4" # Default to 4 months of monthly backups
SPINDB_KEEP_MONTHLY_DAY="1" # Day of the month to keep. Archaic 1-based index sorry.
SPINDB_KEEP_YEARLY="-1" # Default to keep unlimited yearly backups.
SPINDB_KEEP_YEARLY_DAY="0" # Day of the year to keep. 0-365. (0 is Jan 1)
SPINDB_ARCHIVE="gzip" # Set archive mode. Supports `gzip` / `none`
```

You can also configure an alert email to notify when a backup is created.

```
SPINDB_ALERT_EMAIL="webmaster@littlegiant.co.nz"
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

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 ~66 days

Recently: every ~83 days

Total

8

Last Release

2131d ago

PHP version history (2 changes)0.1.2PHP &gt;=5.6

0.2.0PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/a499234983660ff4b31982de5e17e147544b717227fc4f7245070462fd03cbca?d=identicon)[stevie-mayhew](/maintainers/stevie-mayhew)

![](https://www.gravatar.com/avatar/f6a363b2d85dc3e82e73cc9e3a57fc15132920b166c5938ad63a54029b9f94b9?d=identicon)[tractorcow](/maintainers/tractorcow)

![](https://www.gravatar.com/avatar/13a1b78f31cdad3eecbe5d11aadc3f5c527f76cde37710ab91dc03c42565f152?d=identicon)[RyanPotter](/maintainers/RyanPotter)

---

Top Contributors

[![tractorcow](https://avatars.githubusercontent.com/u/936064?v=4)](https://github.com/tractorcow "tractorcow (17 commits)")

---

Tags

awsaws-s3backupdatabasesilverstripe

### Embed Badge

![Health badge](/badges/littlegiant-silverstripe-spindb/health.svg)

```
[![Health](https://phpackages.com/badges/littlegiant-silverstripe-spindb/health.svg)](https://phpackages.com/packages/littlegiant-silverstripe-spindb)
```

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[spatie/laravel-db-snapshots

Quickly dump and load databases

1.2k2.8M20](/packages/spatie-laravel-db-snapshots)[silverstripe/postgresql

SilverStripe now has tentative support for PostgreSQL ('Postgres')

16258.1k2](/packages/silverstripe-postgresql)[silverstripe/mssql

Adds MSSQL support to SilverStripe

157.8k1](/packages/silverstripe-mssql)

PHPackages © 2026

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