Download the PHP package blalmal10a/db-archive without Composer

On this page you can find all versions of the php package blalmal10a/db-archive. 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 db-archive

Easily backup and restore Laravel database tables by saving them into zip files.

Latest Version on Packagist Fix PHP code style issues run-tests PHPStan Total Downloads

db-archive exports database tables into chunked CSV files (400 rows per chunk), packages them into a zip with schema JSON, and can restore tables from those zip files — all through a web UI or API.

Installation

The package works immediately after installation — no migrations, no setup required.\

Optional — Publish config (to customise behaviour)

Optional — Publish views (to customise the UI)

Views are published to resources/views/vendor/db-archive/. Your layout can extend or replace db-archive::layouts.app.

Views load Tailwind CSS and Alpine.js via CDN. No npm setup required.

Default behaviour

Behaviour Default
Auth required Yes — routes use web + auth middleware
Role required super_admin (via Spatie Laravel Permission)
Storage paths storage/backup/ (CSV temp) and storage/app/backup/zip/ (zip archives)
Route prefix None — routes sit at /backup, /restore

Authentication & role access

Out of the box, all routes require an authenticated user with the super_admin role (via spatie/laravel-permission).

Quick role setup

Add the HasRoles trait to your User model:

Create the role and assign to a user:

Bypassing or customising auth / roles

You have full control via the published config. Run:

Then edit config/db-archive.php:

If you use a completely different authorisation system, you can also point the routes to your own controller classes:

Your custom controllers must implement the same public methods as the originals. Extend the package controllers and override only what you need:

Configuration reference

Published config config/db-archive.php:

Override paths via .env:

Routes

Method URI Name
GET /backup backup.index
GET /backup/tables backup.tables
POST /backup/export backup.export
POST /backup/zip backup.zip
GET /backup/download/{fileName} backup.download
DELETE /backup/{fileName} backup.delete
GET /restore restore.index
POST /backup/restore backup.restore

All routes are wrapped in the middleware group from config('db-archive.middleware_group') plus a backup-role check.

Change any route path in the published config without touching the route file.

Usage

Via browser

Visit /backup to see available tables, export them, and manage zip files. Visit /restore to upload a zip, view chunked CSVs grouped by table, and restore data.

Via API

Using PHP

Storage

Backup CSVs and zip files are stored in storage_path(config('db-archive.backup_path')) and storage_path(config('db-archive.zip_path')) respectively — outside public/ by default. Downloads are served through Laravel, not directly by the web server.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of db-archive with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-zip Version *
illuminate/contracts Version ^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.83
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 blalmal10a/db-archive contains the following files

Loading the files please wait ...