Skip to content

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:-

  • Schedule Backup
  • View Backup History of Web(files) and database
  • View Website change history
  • Schedule a restore

Download

Download BountySite cPanel plugin from this link.

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.

  • Extract the file in current folder

    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
    

  • Intall 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}
* That is all! You have successfully installed BountySite plugin * Now, 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.

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

Backup API Key Menu

Top menu API Key

Backup API Key Page

Manage API Key ACL

Manage API Key ACL page:-

  • a : Click on Copy button to copy API Host/URL to your clipboard, for API URL
  • b : Click on Copy button to copy API Key to your clipboard, for API Key
  • c : 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.

Copy credentials to cPanel BountySite page

Login to your cPanel account, and go to BountySite menu. If the installation of cPanel was successful, you will see the below image.

cPanel menu

BountySite in cPanel menu

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.

cPanel configuration successfull

BountySite successfully configured

Troubleshooting

On error, you may get the following notification:-

API Key and sitename mismatch : On BountySite control panel, check if your sitename is the same as the one with wordpress bountysite plugin installation API Key added

API Key verify failed : Check if URL is correct, and has https://.

API Key verification failed

Unauthorized 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. Unauthorized host

Credentials fetch failed : This error is from BountySite Backup History or Revisions page. Implies that API Key has not been configured.

Unauthorized host

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.

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

Backup History

Get Backup History

View Backup History of Web(files) and database

  • From cPanel user account
  • Scroll down - BountySite -> Backup History
  • Note the tabs named Web and Database
  • Tab Web shows web file backup history
  • Tab Database show database file backup history
  • Bytes backed shows total bytes backed
  • On incremental backup Bytes backed shows differential bytes of data transfered
  • Start time column shows when the backup was started post backup queueing
  • Time taken shows the total time taken in seconds from start to end of backup
  • Commit Time shows the time in GMT when the file was acutally commited, which is used as reference for restores

Backup History

Get Site Revisions

View Website change history

  • Fom cPanel user account
  • Scroll down main page BountySite -> Revisions
  • Revisions 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.
  • Note the tabs named Web and Database, for web files and db file respectively

Backup Revisions

Restore

Schedule a restore

  • Fom cPanel user account
  • Scroll down main page BountySite -> Revisions
  • Restore Web or Database, by choosing corresponding tab
  • Click on restore button corresponding to the commit time(snapshot), you want to restore to.

Backup Restore