From a22f2e85315da14adae7c50dc185f4c9093b3439 Mon Sep 17 00:00:00 2001 From: miguilim <35383529+srdante@users.noreply.github.com> Date: Mon, 7 Aug 2023 21:53:42 -0300 Subject: [PATCH] Update README.md --- README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a301a7..c32b477 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ SINGLESTORE_BACKUP_DRIVER= # Local storage SINGLESTORE_BACKUP_PATH= -# S3 storage +# S3 storage (optionals) SINGLESTORE_BACKUP_REGION= SINGLESTORE_BACKUP_MULTIPART_CHUNK_SIZE= SINGLESTORE_BACKUP_FORCE_PATH_STYLE= @@ -88,9 +88,44 @@ php artisan singlestore:backup --differential ## Advanced Usage +Sometimes the simple backup command with configs may not be flexible as you want. Instead, you can use the `SinglestoreBackup` class: + +```php +use Miguilim\LaravelSinglestoreBackup\SinglestoreBackup; + +$backupInstance = new SinglestoreBackup( + driver: 'local', + database: 'mydatabase', + path: '/my-backup/path' +); + +$result = $backupInstance->executeQuery(); +``` + +Available arguments: + +- `driver` +- `database` +- `path` +- `endpoint` +- `timeout` +- `publicKey` +- `secretKey` +- `bucket` +- `init` +- `differential` +- `region` +- `multipartChunkSizeMb` +- `s3ForcePathStyle` ## Publishing Config File +You can publish the package configuration file to your project with the following command: + +```sh +php artisan vendor:publish --tag=singlestore-backup-config +``` + ## License Laravel SingleStore Backup is open-sourced software licensed under the [MIT license](LICENSE). \ No newline at end of file