Sorry for all the extra commits. I'm not used to forking repos and installing from the fork as I usually work on everything locally.
Essentially, this adds src/console/controllers/BackupController.php that enables backups to be ran via command line with php craft db-dump/backup. To accomplish this, the existing controller method was moved to its own service so the same method can be called from both the web and console controllers. A few adjustments to that have been made to account for differences when running via console (ignores redirects, doesn't require the key, and doesn't die()).
Sorry for all the extra commits. I'm not used to forking repos and installing from the fork as I usually work on everything locally.
Essentially, this adds
src/console/controllers/BackupController.php
that enables backups to be ran via command line withphp craft db-dump/backup
. To accomplish this, the existing controller method was moved to its own service so the same method can be called from both the web and console controllers. A few adjustments to that have been made to account for differences when running via console (ignores redirects, doesn't require the key, and doesn'tdie()
).