Download the PHP package escuccim/s3backup without Composer
On this page you can find all versions of the php package escuccim/s3backup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package s3backup
S3Backup
This is a Laravel package that creates a console command to backup a file to Amazon S3.
Install
Via Composer -
Register the class in config/app.php 'providers' array:
You must specify the credentials to your Amazon S3 bucket in your .env file as follows:
Usage
To Dump and Upload Database
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
{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
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
License
The MIT License (MIT).