Skip to content

Commit

Permalink
update backup script
Browse files Browse the repository at this point in the history
  • Loading branch information
alihardan committed Feb 14, 2024
1 parent 947c589 commit 77bf8ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 77bf8ea

Please sign in to comment.