| | # Backup Commander |
---|
| | |
---|
| | Backup Commander is a simple web-based backup platform powered by PHP offering: |
---|
| | |
---|
| | - Easy installation (used to be anyway) |
---|
| | - Complex and comvoluted installation |
---|
| | - Intuitive UI |
---|
| | - Incremental file backup |
---|
| | - Backup scheduling |
---|
| | |
---|
| | ### Installation |
---|
| | -------- |
---|
| | Backup Commander requires a running webserver such as apache using php |
---|
| | Backup Commander requires a running webserver such as apache using php. The install script no longer works due to considerable upgrades. |
---|
| | |
---|
| | 1. Grab the latest version from the repository: `git clone http://pearcey.net:8080/johnpearcey/backup-commander` |
---|
| | 2. Navigate to the install folder `cd install` |
---|
| | 3. Run the install bash script. Note that you must specify the web user which apache is serving as, e.g. www-root or http etc.. |
---|
| | |
---|
| | The install.sh script will automatically pull the latest version so it can be run at any time to update the system. |
---|
| | * Better to login as the webserver user. Use su -s /bin/bash to specify a shell if necessary. This will ensure that user permissions |
---|
| | do not require configuring. |
---|
| | * Grab the latest version from the repository: `git clone http://pearcey.net:8080/johnpearcey/backup-commander` |
---|
| | * Copy the blank database cp install/db/data.db ../../html/data/data.db |
---|
| | * Create install.conf.php based on the sample and set the paths correctly |
---|
| | * Run the database patcher: cd install; php apply-patches.php |
---|
| | * Setup the backup service by copying cp html/svc/bu_cmdr.service /usr/lib/systemd/system/ |
---|
| | * Edit the bu_cmdr.service so that the directories point to the correct locations in your docroot |
---|
| | * Install the service: systemctl daemon-reload |
---|
| | * Start the service: systemctl start bu_cmdr.service |
---|
| | * Check that the service has no errors: journalctl -fu bu_cmdr |
---|
| | * Install composer if not already present |
---|
| | * run composer install (and/or update as required) |
---|
| | * sign up using the login page by clicking on the register link |
---|
| | * After registering, you may prohibit any further registration attempts by non-logged in users by editing the bu-command-nav.json file, |
---|
| | place the entry "secure":1 under the "Naviage"."/register" section. This will ensure that only a logged in user can signup another |
---|
| | email address, a crude form of an invitation. |
---|
| | |
---|
| | The first time install.sh is run, it will require the presence of conf.php. You will need to fill this in with specific information |
---|
| | relative to your setup. An template file is supplied as conf-sample.php. |
---|
| | |
---|
| | The last thing which needs to be done is to edit the sudoers file using visudo. The following line should be added: |
---|
| | > www-data ALL=(ALL) NOPASSWD: /usr/bin/php /var/www/html/bin/run-bu-by-id.php * |
---|
| | |
---|
| | This line shoul be towards the end of the file, e.g. AFTER the %sudo line if you have one. |
---|
| | There is some commandline control of the backup service which can be performed by running various scripts in the html/bin directory. |
---|
| | |
---|
| | ><pre> |
---|
| | Test by switching user to www-data: |
---|
| | su -s /bin/bash www-data |
---|
| |
---|
| | php bin/run-bu-by-id.php 19 0 |
---|
| | where 19 is the backup id and 0/1 is not-test/test |
---|
| | </pre> |
---|
| | |
---|
| | Comment out /inc/secure.php in post_handler.php if the login is not required |
---|
| | |
---|
| | |
---|
| | ### Project directory structure |
---|
| | |
---|
| | <pre> |
---|
| | backup-commander |
---|
| | └─html All web code. You can create a symlink to this directory for your web-server |
---|
| | ├─logs Runtime log files |
---|
| | └─src You can create a symlink to this directory for your web-server. This is written in |
---|
| | the new style using composer. |
---|
| | ├─bu-command-local-conf.json local conf including smtp server details |
---|
| | ├─bu-command-nav.json Site navigation file - overriding Amara defaults |
---|
| | ├─bu-command-pages.json Site page templates file - overriding Amara defaults |
---|
| | ├─css All css files - new location |
---|
| | ├─img All image files - new location |
---|
| | ├─templates All template referenced by the pages-file, overriding Amara defaults |
---|
| | └─ html-old This is a link to the legacy code used where new code has not yet been written |
---|
| | ├─vendor Composer libraries, including Amara. |
---|
| | └─html 1st version web code. This is being rewritten and placed in src using Amara. |
---|
| | ├─ bin Binary scripts runnable via bash. This directory is NOT served |
---|
| | ├─ css All CSS files |
---|
| | ├─ img All image files |
---|
| | ├─ inc All php files. This directory is NOT served |
---|
| |
---|
| | ├─ js All JS files |
---|
| | ├─ shd Common files shared throughout the project |
---|
| | ├─ svc Files dedicated for use by the service only |
---|
| | └─ lib Library files from external projects |
---|
| | └─install Install and update scripts |
---|
| | └─install Mostly deprecated, will need to be fixed. |
---|
| | |
---|
| | </pre> |
---|
| | |
---|
| | |