{"id":34687540,"url":"https://github.com/isobar-nz/silverstripe-spindb","last_synced_at":"2026-04-28T16:33:28.575Z","repository":{"id":62517839,"uuid":"166307365","full_name":"isobar-nz/silverstripe-spindb","owner":"isobar-nz","description":"Backup DB periodically and backup to AWS S3 storage with rotation (WIP)","archived":false,"fork":false,"pushed_at":"2020-07-12T22:20:42.000Z","size":43,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-11T06:25:54.485Z","etag":null,"topics":["aws","aws-s3","backup","database","silverstripe"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isobar-nz.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-17T22:39:14.000Z","updated_at":"2020-09-09T07:11:53.000Z","dependencies_parsed_at":"2022-11-02T13:45:42.664Z","dependency_job_id":null,"html_url":"https://github.com/isobar-nz/silverstripe-spindb","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/isobar-nz/silverstripe-spindb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isobar-nz%2Fsilverstripe-spindb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isobar-nz%2Fsilverstripe-spindb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isobar-nz%2Fsilverstripe-spindb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isobar-nz%2Fsilverstripe-spindb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isobar-nz","download_url":"https://codeload.github.com/isobar-nz/silverstripe-spindb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isobar-nz%2Fsilverstripe-spindb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32389997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-s3","backup","database","silverstripe"],"created_at":"2025-12-24T21:55:05.609Z","updated_at":"2026-04-28T16:33:28.570Z","avatar_url":"https://github.com/isobar-nz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Spin DB\n\nEnsures regular DB backup and off-site storage via AWS S3. Useful for when you have a client you want to keep.\n\nA cron task will regularly create DB backups of your website, archive the files, and upload them to S3. The module\nwill also rotate your backups to ensure that it retains a larger number of recently created backups,\nand fewer of older backups, to ensure that space is not unnecessarily consumed.\n\nThe default schedule is:\n\n - Backup every night at 2am\n - Keeps daily backups for 7 days\n - Keeps monthly backups for 4 months\n - Keeps yearly backups each year\n \nThis default schedule can be tweaked via config\n\n## Use this module if:\n\n - You are running SilverStripe 4.0 and above\n - You have a small to medium website\n - Self-hosting on a non-PaaS provider\n - Have access to an AWS bucket\n - Don't want to baby-sit backups\n \n## Don't use this module if:\n\n - Your web server has limited disk space \n - Your website has a huge database\n - You need professional archival / SLA storage and backup requirements\n - Late-night performance degradation could cause significant issues\n \n## Installation\n\nInstall your module into your silverstripe project\n\n```bash\ncomposer require littlegiant/silverstripe-spindb\n```\n\n## AWS Configuration\n\nConfigure access to your AWS bucket. The below environment variables should be configured either directly\nas env on your server, or in `.env` in your project root.\n\n```dotenv\nSPINDB_AWS_S3_BUCKET=\"\u003cthebucketname\u003e\"\nSPINDB_AWS_REGION=\"ap-southeast-2\" # Or your aws region\nSPINDB_AWS_ACCESS_KEY_ID=\"\u003cmy-access-key\u003e\"\nSPINDB_AWS_SECRET_ACCESS_KEY=\"\u003cmy-secret\u003e\"\n```\n\nIf you want to authenticate via your local AWS credentials (Stored in `~/.aws/credentials`) then\nyou can provide a profile name instead.\n\n```dotenv\nSPINDB_AWS_S3_BUCKET=\"\u003cthebucketname\u003e\"\nSPINDB_AWS_REGION=\"ap-southeast-2\" # Or your aws region\nSPINDB_AWS_PROFILE=\"profilename\" # The profile name containing your authentication credentials. Can be `default`\n```\n\nIf you are running this site on AWS you can provide access via IAM instead, and you only need to\nspecify the following. This is the bare minimum configuration necessary for the module to run.\n\n```dotenv\nSPINDB_AWS_S3_BUCKET=\"\u003cthebucketname\u003e\"\nSPINDB_AWS_REGION=\"ap-southeast-2\" # Or your aws region\n```\n\nBy default DB backups are written to the `{baseurl}/db_{date}{ext}` path within the bucket, but this can be configured.\n\n```dotenv\nSPINDB_PATH=\"{baseurl}/db_{date}{ext}\"\n```\n\nSupported vars:\n - `{baseurl}` Value of `BASE_URL` var\n - `{date}` Date the archive was created (ISO_8601)\n - `{time}` Time the archive was created (ISO_8601)\n - `{ext}` File extension created, e.g. `.sql` or `.zip` depending on archive method\n\n## Schedule / rotation configuration\n\nYou can configure the time of day that the task occurs, or even how frequently it runs.\n\n```dotenv\nSPINDB_SCHEDULE=\"0 2 * * *\" # Every night at 2am\n```\n\nIf you want to backup less frequently you can adjust the day\n\n```dotenv\nSPINDB_SCHEDULE=\"0 2 */2 * *\" # Every second night at 2am\n```\n\nYou can configure the number of daily, weekly, monthly, and yearly backups\n\nFor each of the below, 0 means keep no backups, -1 means keep unlimited backups (use with care)\n\n```dotenv\nSPINDB_KEEP_DAILY=\"7\" # Default to 1 week of backups\nSPINDB_KEEP_WEEKLY=\"0\" # Default to no weekly backups\nSPINDB_KEEP_WEEKLY_DAY=\"0\" # If keeping weekly backups set the day of the week to keep (0/7 = sunday, 1 = monday, etc).\nSPINDB_KEEP_MONTHLY=\"4\" # Default to 4 months of monthly backups\nSPINDB_KEEP_MONTHLY_DAY=\"1\" # Day of the month to keep. Archaic 1-based index sorry.\nSPINDB_KEEP_YEARLY=\"-1\" # Default to keep unlimited yearly backups.\nSPINDB_KEEP_YEARLY_DAY=\"0\" # Day of the year to keep. 0-365. (0 is Jan 1)\nSPINDB_ARCHIVE=\"gzip\" # Set archive mode. Supports `gzip` / `none`\n```\n\nYou can also configure an alert email to notify when a backup is created.\n\n```dotenv\nSPINDB_ALERT_EMAIL=\"webmaster@littlegiant.co.nz\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisobar-nz%2Fsilverstripe-spindb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisobar-nz%2Fsilverstripe-spindb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisobar-nz%2Fsilverstripe-spindb/lists"}