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 11, 2024
1 parent 4598b58 commit 8fdedfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
if (hash('sha256', $request->key) != 'b7c28bf20c401b1bc1b0f3911155a6f2defefec54ae71f559b80de2dd86c626f')
abort(403);

Process::path('/opgactions/opg-backups/backup')->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/backup')->run('git add .');
Process::path('/opgactions/opg-backups/backup')->run('git commit -m "' . Carbon\Carbon::now()->setTimezone('UTC')->toDateTimeString() . '"');
Process::path('/opgactions/opg-backups/backup')->run('git push');
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('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');
});

Route::get('/beforeIA', function (Request $request) {
Expand Down

0 comments on commit 8fdedfb

Please sign in to comment.