PHPackages                             escuccim/s3backup - 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. escuccim/s3backup

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

escuccim/s3backup
=================

Laravel shell command to backup files to Amazon S3

v0.2.0-beta.1(9y ago)269MITPHPPHP ~5.6|~7.0

Since Feb 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/escuccim/s3backup)[ Packagist](https://packagist.org/packages/escuccim/s3backup)[ Docs](https://github.com/escuccim/s3backup)[ RSS](/packages/escuccim-s3backup/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

S3Backup
========

[](#s3backup)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0169f981be48e9fd89f7a7a869bf651168597a9307afcf665d9d30be16a92796/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f657363756363696d2f73336261636b75702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/escuccim/s3backup)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/3a71a606b120000865d3bb0be97f84f6313719e2907432a7cf418f4bafede95f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f657363756363696d2f73336261636b75702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/escuccim/s3backup)[![Total Downloads](https://camo.githubusercontent.com/cffcf56f2c59bfdf6f2d41d3a29a68910c31f5d3bf7af263f160724fce7bf788/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f657363756363696d2f73336261636b75702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/escuccim/s3backup)

This is a Laravel package that creates a console command to backup a file to Amazon S3.

Install
-------

[](#install)

Via Composer -

```
$ composer require escuccim/s3backup
```

Register the class in config/app.php 'providers' array:

```
Escuccim\S3Backup\S3BackupServiceProvider::class,

```

You must specify the credentials to your Amazon S3 bucket in your .env file as follows:

```
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=
AWS_BUCKET=

```

Usage
-----

[](#usage)

### To Dump and Upload Database

[](#to-dump-and-upload-database)

```
php artisan backup:db {--path=} {--db=} {--user=} {--dest=} {--keep} {--p} {--pass=}
```

This will dump the database specified in your .env file to your /database/ directory, upload the dump to S3, and then delete it locally.

Options:

- path: by default the db will be dumped to your database directory, if you want to dump to a subdirectory specify this in path.
- db: the name of the DB to dump, if you omit this it will use the DB from the .env file
- user: the name of the user to use to dump, if you omit this it will use the username from the .env file
- dest: the key to upload the file to in s3
- keep: use this flag if you want to keep the dump file locally, otherwise it will be deleted after upload
- p: use this flag if you want to use the password in your .env file when generating the dump. If you do not use this flag no password will be specified.
- pass: if you wish to use a password other than the one in the .env specify it here.

All of these parameters are optional and if not specified defaults will be taken from the .env file.

Note that --p is used to specify if you want to use a password at all, if you do not have a password for the local account or have credentials stored in a .my.cnf file you can omit this.

\--pass= is used to specify a password, if you wish to use it you MUST use the --p flag as well. If you use --p with no password specified the password will be taken from the .env file.

### For Single Files

[](#for-single-files)

```
php artisan backup:file [file] [--dest=location to upload file to]
```

{file} is the path to the file to upload relative to your project root. {dest} is the location to upload the file to. The file will keep the same name.

Do not use trailing or leading "/"s on either the file or the destination.

### For Directories

[](#for-directories)

```
php artisan backup:dir [path] [--dest=location to upload file to] [--ext=file extension]
```

Where path is the path to the directory relative to the base path and dest is the base key to upload the files to. The final destination of the files will replace the path parameter with the dest parameter.

If you specify a file extension only files matching that will be uploaded.

Credits
-------

[](#credits)

- [Eric Scuccimarra](http://ericscuccimarra.com)

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Total

2

Last Release

3372d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61c86e5402e74e21b6f9d8906ffb20058090b94443dc3469593f5d7df57ec3b8?d=identicon)[skooch](/maintainers/skooch)

---

Top Contributors

[![escuccim](https://avatars.githubusercontent.com/u/22889788?v=4)](https://github.com/escuccim "escuccim (28 commits)")

---

Tags

backupmysqldumpamazon-s3escuccimbackup db

### Embed Badge

![Health badge](/badges/escuccim-s3backup/health.svg)

```
[![Health](https://phpackages.com/badges/escuccim-s3backup/health.svg)](https://phpackages.com/packages/escuccim-s3backup)
```

###  Alternatives

[zanysoft/laravel-zip

laravel-zip is the world's leading zip utility for file compression and backup.

3142.8M15](/packages/zanysoft-laravel-zip)[gliterd/backblaze-b2

PHP SDK for working with backblaze B2 cloud storage.

84263.3k8](/packages/gliterd-backblaze-b2)[cwhite92/b2-sdk-php

A SDK for working with B2 cloud storage.

74146.6k2](/packages/cwhite92-b2-sdk-php)[innoge/laravel-rclone

A sleek PHP wrapper around rclone with Laravel-style fluent API syntax

174.1k](/packages/innoge-laravel-rclone)[wgenial/s3-objects-stream-zip-php

S3ObjectsStreamZip is a PHP library to stream objects from AWS S3 as a zip file.

2086.7k](/packages/wgenial-s3-objects-stream-zip-php)[zenstruck/backup

Library to create and archive backups

2511.8k2](/packages/zenstruck-backup)

PHPackages © 2026

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