heybigname/backup-manager — pull request #34 by antonioribeiro (2014-07-12 22:36:17+00:00)
Title: Add option to prefix backup file name

Having this as storage.php:

```
return [
'local' => [
'type' => 'Local',

'root' => getenv('BACKUP.PATH') . '/' .
getenv('DOMAIN'),

'prefix' => gethostname() . '.' .
getenv('ENV_NAME') . '.' .
app()->make('db')->connection()->getDatabaseName() . '.' .
app()->make('db')->connection()->getDriverName() . '.' .
\Carbon\Carbon::now()->format('Y-m-d+H\hi\ms\s') . '.' ,

],
];
```

I can now do:

```
php artisan db:backup --database="postgresql" --destination=local --destinationPath=/daily/dump.bak --compression=gzip
```

And it saves this file:

```
/tmp/backup/mydomain.com/daily/servername.staging.mydbname.pgsql.2014-07-12+22h29m05s.dump.bak
```

I wasn't sure if I should have also added the prefix to the temporary working file, since it will, at some point, be renamed or deleted, but if I have to just tell.