Download the PHP package xslain/database-backup-sync without Composer

On this page you can find all versions of the php package xslain/database-backup-sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package database-backup-sync

Database Backup Sync

Automated 24-hour database backups with multi-cloud upload (S3, Google Drive, OneDrive, local), AES-256-GCM / GPG encryption, retention policies, integrity verification, and observability for Laravel.


Features

Requirements

Installation

Publish the configuration (and optionally the migration for run history):

The migration is optional — run history and the status endpoint's recent_runs only work when the database_backup_runs table exists.

Quick start

Set the minimum environment variables, then run a backup:

Generate an encryption key with:

Commands

Command Description
php artisan db:backup Dump → compress → encrypt → upload → record → prune
php artisan db:backup:prune Apply the retention policy and delete expired backups
php artisan db:backup:list List stored backups across drivers
php artisan db:backup:restore {file} Download, decrypt, and restore a backup
php artisan db:backup:test Verify connectivity to each driver with a probe upload

Scheduling

The package registers db:backup with Laravel's scheduler automatically. Add the scheduler to your system cron (once per minute):

Defaults (all configurable):

Configuration

All configuration lives in config/database-backup.php (published) and is driven by environment variables. Highlights:

Area Env vars
Default driver DB_BACKUP_DRIVER
S3 AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, DB_BACKUP_S3_BUCKET, DB_BACKUP_S3_PREFIX
Google Drive DB_BACKUP_DRIVE_AUTH, DB_BACKUP_DRIVE_SERVICE_ACCOUNT_JSON, DB_BACKUP_DRIVE_FOLDER_ID
OneDrive DB_BACKUP_ONEDRIVE_TENANT_ID, DB_BACKUP_ONEDRIVE_CLIENT_ID, DB_BACKUP_ONEDRIVE_CLIENT_SECRET, DB_BACKUP_ONEDRIVE_GRANT
Encryption DB_BACKUP_ENCRYPT, DB_BACKUP_KEY, DB_BACKUP_GPG, DB_BACKUP_GPG_RECIPIENTS
Retention DB_BACKUP_RETENTION_DAYS, DB_BACKUP_RETENTION_COUNT, DB_BACKUP_RETENTION_MAX_SIZE
Scheduling DB_BACKUP_SCHEDULE_EXPRESSION, DB_BACKUP_SCHEDULE_TIMEZONE
Notifications DB_BACKUP_SLACK_WEBHOOK_URL, DB_BACKUP_EMAIL_TO, DB_BACKUP_WEBHOOK_URL, DB_BACKUP_WEBHOOK_SECRET
Queue DB_BACKUP_QUEUE, DB_BACKUP_QUEUE_TRIES
Status endpoint DB_BACKUP_STATUS_ENABLED, DB_BACKUP_STATUS_TOKEN

See docs/CONFIGURATION.md for the complete reference.

Programmatic usage

Status endpoint

When enabled, a token-protected JSON endpoint reports the last run, recent runs, storage usage, and metrics:

Events

Listen to these events to build your own integrations:

Event Fired when
BackupStarted A backup run begins
BackupCompleted A backup finished and was uploaded
BackupFailed A backup run failed
BackupUploaded A file was uploaded to one driver
BackupUploadFailed An upload to one driver failed
BackupPruned Retention pruning deleted files
StorageUsageAlert A driver's usage exceeded the configured threshold

Documentation

Testing

License

MIT — see LICENSE.

Built by Xslain Innovations Limited.


All versions of database-backup-sync with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
ext-openssl Version *
ext-pdo Version *
guzzlehttp/guzzle Version ^7.4
illuminate/console Version ^8.83|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^8.83|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^8.83|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/events Version ^8.83|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/filesystem Version ^8.83|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^8.83|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/log Version ^8.83|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/mail Version ^8.83|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/notifications Version ^8.83|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^8.83|^9.0|^10.0|^11.0|^12.0|^13.0
nesbot/carbon Version ^2.62|^3.0
symfony/process Version ^5.4|^6.0|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xslain/database-backup-sync contains the following files

Loading the files please wait ...