Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pseux committed Apr 1, 2020
1 parent 08faa54 commit 665b912
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,21 @@
# Laravel database backup package
# Laravel package: backups

Laravel package that adds a command to back up the database, compress it, and upload to an S3 account.
## Config

Puts the backup into a folder based on your environmental variables APP_NAME and APP_ENV.

Filename format: `{APP_ENV}-{APP_NAME}/db-{DATE}-{TIME}-{HASH}.sql.gz`

## Requirements

Set up your database config, plus add in your AWS S3 config

#### Laravel < 5.5.22
```
AWS_KEY=
AWS_SECRET=
AWS_REGION=
AWS_BUCKET=
```

#### Laravel >= 5.5.22
```
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=
AWS_BUCKET=
```

## Scheduling backup
## Examples

Add the following code to the `schedule` function in your `App\Console\Kernel.php` file:
php artisan backup db
php artisan backup:import env

$schedule->command('backup:run')->daily();
## Scheduling backups

## Loading backups
Add the following code to the `schedule` function in your `App\Console\Kernel.php` file:

php artisan backup:run --import={source}
$schedule->command('backup db')->daily();

0 comments on commit 665b912

Please sign in to comment.