Newer
Older
backup-commander / README.md
  1. # Backup Commander
  2.  
  3. Add this line in the sudoers file (use visudo) and it must go AFTER the %sudo line
  4.  
  5. www-data ALL=(ALL) NOPASSWD: /usr/bin/php /var/www/html/bin/run-bu-by-id.php *
  6.  
  7. > [!NOTE]
  8. > A test note
  9.  
  10. Test by switching user to www-data:
  11. su -s /bin/bash www-data
  12. cd /var/www/html
  13. php bin/run-bu-by-id.php 19 0
  14. where 19 is the backup id and 0/1 is not-test/test
  15. Comment out /inc/secure.php in post_handler.php if the login is not required
  16. Highlighted `wxallowed`
  17.  
  18. html anchor [mount(8)](https://man.openbsd.org/mount.8))
  19. ### Project directory structure
  20. ```sh
  21.  
  22. backup-commander
  23. └─html All web code. You can create a symlink to this directory for your web-server
  24. ├─bin Binary scripts runnable via bash. This directory is NOT served
  25. ├─css All CSS files
  26. ├─img All image files
  27. ├─inc All php files. This directory is NOT served
  28. └─js All JS files
  29. └─install Install and update scripts
  30.  
  31. ```
  32.  
  33. ### Updating the App
  34.  
  35. To pull down the latest changes from the repo, navigate to you project directory (where the original clone was
  36. performed) and then the install folder. In there, run the bash script install.sh
  37.  
  38. Note that you need to specify the user which your web-server is running as.
  39.  
  40. This script will pull the latest changes from the repo and perform any additionally required data/file updates
  41.  
  42. TODO:
  43.  
  44. create an install script: -- currently all manually done
  45. First version on Las-server
  46. Pre-requesite to push onto pearcey.net
  47. Generate a database schema with default login
  48. add the sudo entry for www-data (or other webserver user)
  49. kick off the schedule runner at the install stage
  50.  
  51.  
  52. create the schedule runner in php. simple polling of the DB
  53. get passwords from BD
  54. create a user credential page:
  55. new user+password
  56. change own password
  57. but only if the login is enabled (in post_handler.php)