BountySite cPanel Plugin

Introduction

BountySite cPanel plugin allows BountySite users to manage their backups from within cPanel. This is done by making REST API to BountySite Backup API. BountySite uses FTP/SFTP/FTPS mode to transfer data, as configured within BountySite control panel.

BountySite plugin allows cPanel users to manage the following features:-
  • gps_fixedSchedule Backup
  • gps_fixedView Backup History of Web(files) and database
  • gps_fixedView Website change history
  • gps_fixedSchedule a restore
Download

Download BountySite cPanel plugin from the link below.

You can also download directly on the server using wget

 
$ mkdir bountysite && cd bountysite
$ wget -O cpanel-bountysite-plugin.tar.gz  https://www.bountysite.com/downloads/bountysite-cpanel-plugin.tar.gz
Installing

Download the plugin on the web hosting server. The installation needs sudo (root) or root privileges to install files withing cPanel installed folder.

  • gps_fixedExtract the file under
  • 
    bountysite $ tar xvzf cpanel-bountysite-plugin.tar.gz 
    bountysite.tar.gz
    lib/
    lib/configobj.py
    lib/systemd/
    lib/systemd/__init__.py
    lib/systemd/journal.py
    lib/systemd/_journal.so
    lib/systemd/_reader.so
    lib/systemd/daemon.py
    lib/systemd/login.so
    lib/systemd/_daemon.so
    lib/systemd/id128.so
    lib/Bountysite.pm
    lib/pyinotify.py
    lib/requests/
    lib/requests/compat.py
    lib/requests/structures.py
    lib/requests/__init__.py
    lib/requests/status_codes.py
    lib/requests/models.py
    lib/requests/cookies.py
    lib/requests/exceptions.py
    lib/requests/packages/
    lib/requests/packages/__init__.py
    lib/requests/hooks.py
    lib/requests/certs.py
    lib/requests/auth.py
    lib/requests/utils.py
    lib/requests/adapters.py
    lib/requests/sessions.py
    lib/requests/api.py
    lib/traceback2/
    lib/traceback2/__init__.py
    lib/BountySite.py
    bin/
    bin/InotifyBountySite.py
    scripts/
    scripts/config.ini
    scripts/revisions.live.pl
    scripts/bsinotify.service
    scripts/run_backup_now.live.pl
    scripts/Bountysite.pm
    scripts/restoreto.live.pl
    scripts/add_api_key.live.pl
    scripts/backup_history.live.pl
    README.md
    install.sh
    uninstall.sh
    
                        
  • gps_fixedIntall the plugin by running install script. By default the install script will install under cPanel paper_lantern theme under /usr/local/cpanel/ cpanel directory. The plugin also installs files under /usr/local/bountysite.
  • $ #Install under /usr/local/cpanel
    $ sudo install.sh 
    
    $ # To install for another theme and different cpanel install path 
    $ sudo install.sh  {theme_name} {cpanel_install_dir}
                        
  • gps_fixedThat is all! You have successfully installed BountySite plugin
  • gps_fixedNow, cPanel users on the hosting server can configure their respective accounts
Configuring

Users have to login to their respective accounts in cPanel, and configure BountySite. Here is how to get going.

1. Get API Key and URL details

Login to your BountySite control panel. On top navigation bar, click on second last button, with tooltip "Settings". Then choose, Get API Key

Top menu API Key page


Manage API Key ACL

Manage API Key ACL page:-

  • chevron_righta : Click on Copy button to copy API Host/URL to your clipboard, for API URL
  • chevron_rightb : Click on Copy button to copy API Key to your clipboard, for API Key
  • chevron_rightc : By default API is blocked for public access. To allow your host to make API calls, add your public internet IPaddress in CIDR format(x.x.x.x/32 or range x.x.x.x/28). You can give multiple IPs separated by commas.
2. Copy credentials to cPanel BountySite page

Login to your cPanel account, and go to BountySite menu.

cPanel BountySite menu
cPanel BountySite API configure

Paste the credentials from BountySite control panel API Key page. On submitting the form, the plugin makes a REST call to BountySite Backup API and validates the API URL and key, with respect to your sitename(which is automatically fetched from cPanel internal LiveAPI). On confirmation, the values are stored in user's home directory at ~/etc/bountysite/config.ini.

Troubleshooting

    On error, you may get the following notification:-

  • chevron_rightAPI Key and sitename mismatch : On BountySite control panel, check if your sitename is the same as the one with wordpress bountysite plugin installation
  • chevron_rightAPI Key verify failed : Check if URL is correct, and has https://.
  • chevron_rightUnauthorized Host : Check if you added the primary public IP Address of your web hosting server. This IP is used for outbound calls. It is possible that your web host may have multiple IPs. Contact your hosting provider to find the primary public IP. Add the IP to API Key page as x.x.x.x/32.
  • chevron_rightCredentials fetch failed : This error is from BountySite Backup History or Revisions page. Implies that API Key has not been configured.
Schedule a backup

On cPanel, scroll down to go to BountySite -> Backup History, and click on RunBackupNow. The backup is scheduled for web files and databases as configured in BountySite control panel. The mode of transfer is as configured in control panel.

  • chevron_rightMenu : BountySite -> Backup History
  • chevron_rightTop right side, button, named "RunBackupNow" to schedule a backup
  • chevron_rightWeb(files) and database is shceduled for download via mode(FTP/SFTP/SFTP) configured in BountySite control panel
  • chevron_rightBountySite backup history page will confirm backup post completion of the backup process
Get Backup History

View Backup History of Web(files) and database

  • chevron_rightFrom cPanel user account
  • chevron_rightScroll down - BountySite -> Backup History
  • chevron_rightNote the tabs named Web and Database
  • chevron_rightTab Web shows web file backup history
  • chevron_rightTab Database show database file backup history
  • chevron_rightBytes backed shows total bytes backed
  • chevron_rightOn incremental backup Bytes backed shows differential bytes of data transfered
  • chevron_rightStart time column shows when the backup was started post backup queueing
  • chevron_rightTime taken shows the total time taken in seconds from start to end of backup
  • chevron_rightCommit Time shows the time in GMT when the file was acutally commited, which is used as reference for restores
Get Site Revisions

View Website change history

  • chevron_rightFom cPanel user account
  • chevron_rightScroll down main page BountySite -> Revisions
  • chevron_rightRevisions page shows history of site changes. This is different from Backup History, cause every backup may not have a change in Web(files) or database.
  • chevron_rightNote the tabs named Web and Database, for web files and db file respectively
Restore

Schedule a restore

  • chevron_rightFom cPanel user account
  • chevron_rightScroll down main page BountySite -> Revisions
  • chevron_rightRestore Web or Database, by choosing corresponding tab
  • chevron_rightClick on restore button corresponding to the commit time(snapshot), you want to restore to.
arrow_upward