PHPackages                             ekoukltd/s3-import-export - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. ekoukltd/s3-import-export

ActiveLibrary[File &amp; Storage](/categories/file-storage)

ekoukltd/s3-import-export
=========================

Easy import &amp; export of Laravel models (tables) to local or S3 Storage as a JSON file. For when you don't want to restore a whole backup, just a few tables.

1.0.4(3y ago)031MITPHPPHP ^7.4|^8.0

Since Jan 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ekoukltd/s3-import-export)[ Packagist](https://packagist.org/packages/ekoukltd/s3-import-export)[ Docs](https://github.com/ekoukltd/s3-import-export)[ RSS](/packages/ekoukltd-s3-import-export/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Save specific tables to remote storage
======================================

[](#save-specific-tables-to-remote-storage)

[![Latest Version on Packagist](https://camo.githubusercontent.com/981bf731be28cbed2e4bdbd673e2f222c899350c14041c0dd696041d08cb6084/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656b6f756b6c74642f73332d696d706f72742d6578706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ekoukltd/laravel-import-export)[![Total Downloads](https://camo.githubusercontent.com/5ef3bc70b7b7037e74d57181e1408515e025dcbba871e58e9e7d02035707a2bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656b6f756b6c74642f73332d696d706f72742d6578706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ekoukltd/laravel-import-export)

Ever needed to copy selected models between server environments? Or seed a database with latest content?

This package exports models to S3 or other remote disks as a JSON file.

#### This is not designed to be a robust backup service

[](#this-is-not-designed-to-be-a-robust-backup-service)

Just a tool to move content based models between different environments without any hassle.

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

[](#installation)

Install the package via composer:

```
composer require ekoukltd/s3-import-export
```

Configuration
-------------

[](#configuration)

Publish the config file to config/s3-import-export.php

```
php artisan vendor:publish --provider="Ekoukltd\S3ImportExport\S3IOServiceProvider" --tag="config"
```

and define which what should be exported to where. For S3 you need to have setup league/filesystem see:

```
    //Data will be exported to this disk -> choose from config.filesystems.disks options
	//Note that if using s3 a local copy will also be created in storage when importing
	//When running tests local storage copy will be used.
	'disk'           => 's3',

	//Where to stick em.  Note trailing slash
	'export_dir' => 'content-export/',

	//Add your models to import and export here
	'content_models' => [
		//Json object exports are ideal for copying content type data like pages, posts and templates
		//without affecting the reset of the database
		'App\\Models\\Pages',
		'App\\Models\\Posts',
		'App\\Models\\EmailTemplates',
	],

	 /** IMPORTANT **/
	//Carbon dates export with a timezone by default, which throws an error when importing to sql
	//If your using timestamps either set any other date fields here
	'date_columns' => ['created_at', 'updated_at', 'deleted_at']

    //or set the format in the model
    protected $casts = [
        'email_verified_at' => 'datetime:Y-m-d H:i:s'
        'my_date_field'     => 'datetime:Y-m-d H:i:s',
    ];
```

Usage
-----

[](#usage)

```
#Export from the CLI
php artisan data:export

#Import
php artisan data:import

#Or in a scheduled task:
Artisan::call('data:export');
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Lee Evans](https://github.com/ekoukltd)
- [Eko UK](https://www.ekouk.com)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Total

5

Last Release

1158d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/133e7275d57b3053e870a66332b987ae0be489e1c61938f22196d42cf19d2be9?d=identicon)[ekoukltd](/maintainers/ekoukltd)

---

Top Contributors

[![cannycookie](https://avatars.githubusercontent.com/u/500822?v=4)](https://github.com/cannycookie "cannycookie (8 commits)")

---

Tags

ekoukltds3-import-exportexport-laravel-models-to-s3

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ekoukltd-s3-import-export/health.svg)

```
[![Health](https://phpackages.com/badges/ekoukltd-s3-import-export/health.svg)](https://phpackages.com/packages/ekoukltd-s3-import-export)
```

###  Alternatives

[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[spatie/laravel-google-cloud-storage

Google Cloud Storage filesystem driver for Laravel

2408.9M13](/packages/spatie-laravel-google-cloud-storage)

PHPackages © 2026

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