Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

Back up the database with paulocastellano/laravel-database-backup (#496)

Paulo Castellano2ccff3603363
diff --git a/.env.example b/.env.example
index 880ef919a..688717f08 100644
--- a/.env.example
+++ b/.env.example
@@ -126,6 +126,21 @@ SPACES_ENDPOINT=
SPACES_REGION=
SPACES_BUCKET=
+# Database backups (paulocastellano/laravel-database-backup): pg_dump /
+# mysqldump, gzipped, to a private S3-compatible bucket every N hours (UTC).
+# BACKUP_ENDPOINT picks the provider (Cloudflare R2, S3, Spaces...).
+BACKUP_ENABLED=false
+BACKUP_INTERVAL_HOURS=6
+BACKUP_KEEP_DAYS=30
+BACKUP_BUCKET=
+BACKUP_DIRECTORY=trypost
+BACKUP_ENDPOINT=
+BACKUP_REGION=auto
+BACKUP_ACCESS_KEY_ID=
+BACKUP_SECRET_ACCESS_KEY=
+BACKUP_NOTIFY_EMAIL=
+BACKUP_NOTIFY_DISCORD_WEBHOOK_URL=
+
# ============================================
# Social Platform Credentials
# ============================================
diff --git a/compose.prod.yaml b/compose.prod.yaml
index f15bc57d2..a4b385037 100644
--- a/compose.prod.yaml
+++ b/compose.prod.yaml
@@ -77,6 +77,21 @@ services:
# AWS_DEFAULT_REGION: us-east-1
# AWS_BUCKET: ""
# AWS_URL: ""
+ #
+ # --- Database backups (paulocastellano/laravel-database-backup): gzipped
+ # pg_dump every N hours (UTC) to a PRIVATE S3-compatible bucket (R2, S3,
+ # Spaces...); BACKUP_ENDPOINT picks the provider ---
+ # BACKUP_ENABLED: "true"
+ # BACKUP_INTERVAL_HOURS: "6"
+ # BACKUP_KEEP_DAYS: "30" # 0 keeps every backup
+ # BACKUP_BUCKET: "" # required
+ # BACKUP_DIRECTORY: trypost # required: folder of the bucket
+ # BACKUP_ENDPOINT: ""
+ # BACKUP_REGION: auto
+ # BACKUP_ACCESS_KEY_ID: ""
+ # BACKUP_SECRET_ACCESS_KEY: ""
+ # BACKUP_NOTIFY_EMAIL: "" # every success and failure
+ # BACKUP_NOTIFY_DISCORD_WEBHOOK_URL: ""
# ===== Mail =====
# Defaults to "log" (emails written to the container log). Configure SMTP
diff --git a/composer.json b/composer.json
index 216b40141..869d1edbd 100644
--- a/composer.json
+++ b/composer.json
@@ -50,6 +50,7 @@
"laravel/tinker": "^3.0",
"laravel/wayfinder": "^0.1.9",
"league/flysystem-aws-s3-v3": "^3.0",
+ "paulocastellano/laravel-database-backup": "^1.0",
"posthog/posthog-php": "^4.1",
"predis/predis": "^3.3",
"sendkit/sendkit-laravel": "^1.1",
diff --git a/composer.lock b/composer.lock
index 50573ae63..950c654ad 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "05783f339378d5195d0e90080f8b9514",
+ "content-hash": "ba1555ff77647ccb0535955d2cee483d",
"packages": [
{
"name": "aws/aws-crt-php",
@@ -5071,6 +5071,93 @@
},
"time": "2020-10-15T08:29:30+00:00"
},
+ {
+ "name": "paulocastellano/laravel-database-backup",
+ "version": "v1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/paulocastellano/laravel-database-backup.git",
+ "reference": "bc82aa7f8c9022125d6e2d4d129c5b8020cd4f04"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/paulocastellano/laravel-database-backup/zipball/bc82aa7f8c9022125d6e2d4d129c5b8020cd4f04",
+ "reference": "bc82aa7f8c9022125d6e2d4d129c5b8020cd4f04",
+ "shasum": ""
+ },
+ "require": {
+ "ext-zlib": "*",
+ "guzzlehttp/guzzle": "^7.8||^8.0",
+ "illuminate/console": "^12.0||^13.0",
+ "illuminate/database": "^12.0||^13.0",
+ "illuminate/filesystem": "^12.0||^13.0",
+ "illuminate/http": "^12.0||^13.0",
+ "illuminate/mail": "^12.0||^13.0",
+ "illuminate/process": "^12.0||^13.0",
+ "illuminate/support": "^12.0||^13.0",
+ "league/flysystem-aws-s3-v3": "^3.0",
+ "php": "^8.3"
+ },
+ "require-dev": {
+ "larastan/larastan": "^3.9",
+ "laravel/pao": "^1.0",
+ "laravel/pint": "^1.29",
+ "orchestra/testbench": "^10.0||^11.0",
+ "pestphp/pest": "^4.6||^5.0",
+ "pestphp/pest-plugin-laravel": "^4.1||^5.0",
+ "pestphp/pest-plugin-type-coverage": "^4.0||^5.0",
+ "phpstan/extension-installer": "^1.4"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "PauloCastellano\\DatabaseBackup\\DatabaseBackupServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PauloCastellano\\DatabaseBackup\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Paulo Castellano",
+ "email": "[email protected]",
+ "role": "Developer"
+ }
+ ],
+ "description": "Back up your Laravel database (PostgreSQL, MySQL, MariaDB) to a private S3-compatible bucket on a schedule, with email and Discord notifications.",
+ "homepage": "https://github.com/paulocastellano/laravel-database-backup",
+ "keywords": [
+ "backup",
+ "database",
+ "discord",
+ "laravel",
+ "mariadb",
+ "mysql",
+ "postgresql",
+ "r2",
+ "s3"
+ ],
+ "support": {
+ "issues": "https://github.com/paulocastellano/laravel-database-backup/issues",
+ "source": "https://github.com/paulocastellano/laravel-database-backup"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/paulocastellano",
+ "type": "github"
+ }
+ ],
+ "time": "2026-11-13T15:06:37+00:00",
+ "published-time": "2026-11-13T15:07:40+00:00"
+ },
{
"name": "php-http/discovery",
"version": "1.20.0",
@@ -15915,5 +16002,5 @@
"php": "^8.2"
},
"platform-dev": {},
- "plugin-api-version": "2.9.0"
+ "plugin-api-version": "2.11.0"
}