From 77bf8eaba2f2337e11e0065c870d6ae8df3be31b Mon Sep 17 00:00:00 2001 From: alihardan Date: Wed, 14 Feb 2024 17:05:56 +0330 Subject: [PATCH] update backup script --- routes/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api.php b/routes/api.php index ac7004d..cd55fca 100644 --- a/routes/api.php +++ b/routes/api.php @@ -48,7 +48,7 @@ if (hash('sha256', $request->key) != 'b7c28bf20c401b1bc1b0f3911155a6f2defefec54ae71f559b80de2dd86c626f') abort(403); - Process::path('/opgactions/opg-backups')->run('mysqldump --skip-extended-insert --skip-dump-date -u' . env('DB_USERNAME') . ' -p' . env('DB_PASSWORD') . ' ' . env('DB_DATABASE') . ' > opgmanager.sql'); + Process::path('/opgactions/opg-backups')->run('mysqldump --skip-extended-insert --skip-dump-date -h' . env('DB_HOST') . ' -u' . env('DB_USERNAME') . ' -p' . env('DB_PASSWORD') . ' ' . env('DB_DATABASE') . ' > opgmanager.sql'); Process::path('/opgactions/opg-backups')->run('git add .'); Process::path('/opgactions/opg-backups')->run('git commit -m "' . Carbon\Carbon::now()->setTimezone('UTC')->toDateTimeString() . '"'); Process::path('/opgactions/opg-backups')->run('git push');