Simple web-based backup GUI

build-src Updated to use more recent Amara and added the database code 28 days ago
html Updated to use more recent Amara and added the database code 28 days ago
install Started the conversion to a composer project and using Amara framework 4 months ago
src Updated to use more recent Amara and added the database code 28 days ago
.gitignore Updated to use more recent Amara and added the database code 28 days ago
README.md encorporated old site into new login using Amara 3 months ago
composer.json Updated to use more recent Amara and added the database code 28 days ago
composer.lock Updated to use more recent Amara and added the database code 28 days ago
file-layout.txt Started the conversion to a composer project and using Amara framework 4 months ago
git-info.sh wip 5 months ago
notes.txt Updated to use more recent Amara and added the database code 28 days ago
README.md

Backup Commander

Backup Commander is a simple web-based backup platform powered by PHP offering:

  • Complex and comvoluted installation
  • Intuitive UI
  • Incremental file backup
  • Backup scheduling

Installation


Backup Commander requires a running webserver such as apache using php. The install script no longer works due to considerable upgrades.

  • 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.

There is some commandline control of the backup service which can be performed by running various scripts in the html/bin directory.

Test by switching user to www-data:
su -s /bin/bash www-data
cd /var/www/html
php bin/run-bu-by-id.php 19 0
    where 19 is the backup id and 0/1 is not-test/test

Project directory structure

backup-commander
├─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 ├─ data All data 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 Mostly deprecated, will need to be fixed.