Initial Setup Guide using the JetBackup 5 API

We commonly receive questions on how to complete initial setup of JetBackup 5 (creating destinations, jobs, skipping the Showcase screen, etc) exclusively through the API. The following steps will allow you to:

 

  • Proceed past the DR Wizard with "New Installation"
  • Install the S3-Compatible Destination Plugin
  • Create a S3-Destination
  • Create a Daily Schedule which runs every day
  • Create a Backup Job and assign your Daily Schedule

This is only intended to be a basic setup guide. Additional options and flags are available in our JetBackup 5 API documentation here: 

https://docs.jetbackup.com/v5.2/api/index.html

New Installation Setup

Our recommended way to automate the deployment of JB5 is through the API and using an automation platform such as Ansible. You can automate setup of destinations, settings, backup jobs, creating schedules, etc via the API.

For example, to automate approval of the EULA and Feature Showcase screens: https://docs.jetbackup.com/v5.2/api/System/dr.html

  • Indicate that you have read and agree to the EULA
    jetbackup5api -F approveAgreement
  • Exit Disaster Recovery (Fresh Installation)
    jetbackup5api -F factoryReset
  • Get Showcase ID
    jetbackup5api -F listShowcase
  • Approve Showcase by ID
    jetbackup5api -F approveShowcase -D "_id={Showcase_ID}"

Setting up a Destination

 

Since JetBackup 5 uses plugins to enable any destination other than Local, you would need to use the Plugins API calls to first install and enable the plugin if you're planning to use: SSH, S3, or FTP:
https://docs.jetbackup.com/v5.2/adminpanel/Plugins/plugins.html

  • Obtain the plugin _id for the S3 Destination Plugin
    jetbackup5api -F listPackages -D "find[code]=S3"
  • Install the S3-Compatible Destination Plugin and enable it
    jetbackup5api -F installPlugin -D "package_id=63cb171253f682926c04f22b&disabled=0"

To create the S3 Destination for Wasabi: https://docs.jetbackup.com/v5.2/api/Destinations/destinations.html#managedestination
The different destination options are listed in the "Parameter Dictionary" under "Destination Options": https://docs.jetbackup.com/v5.2/api/Destinations/destinations.html#destination-options

  • Create a S3 Destination. Take note of the destination _id - it will be needed when creating a backup job.
    jetbackup5api -F manageDestination -D "type=S3&options[path]=/BACKUPS&options[access_key]={BUCKET_ACCESS_KEY}&options[secret_key]={BUCKET_SECRET_KEY}&options[bucket]={BUCKET_NAME}&options[verifyssl]=1&options[retries]=5&options[region]={REGION}&options[endpoint]=s3.{region}.wasabisys.com&name=Wasabi&action=create

Creating a Schedule and Backup Job

 

To create a Backup Job with a schedule, you would need to create the schedule first. 

https://docs.jetbackup.com/v5.2/api/Schedules/schedules.html#manageschedule

  • Create a Daily Schedule that runs every day. Take note of the schedule _id
    jetbackup5api -F manageSchedule -D "name=Daily-Schedule&type=2&type_data[0]=1&type_data[1]=2&type_data[2]=3&type_data[3]=4&type_data[4]=7&type_data[5]=6&type_data[6]=5&action=create"
  • Create a Backup Job with the above schedule _id. Please also refer to the documentation for an example API call with other options (such as an exclude list): https://docs.jetbackup.com/v5.2/api/BackupJobs/backupjobs.html#managebackupjob

jetbackup5api -F manageBackupJob -D "name=BackupJob&destination[0]={DESTINATION_ID}&type=1&contains=511&structure=1&time=0&monitor[ranfor]=0&monitor[notran]=0&schedules[0][_id]={SCHEDULE_ID}&schedules[0][retain]=7&action=create"

 

  • 14140 Users Found This Useful
Was this answer helpful?

Related Articles

Email Notifications Are Not Being Sent

JetBackup 5 uses Notification Integrations to send Notifications based on the configured...

What are the level of Alerts in JetBackup 5?

JetBackup 5 now has only 3 Alert levels compared to JetBackp 4. All 3 levels will appear on the...

JetBackup 5 process stops every 10 minutes

On Cloudlinux servers, it has been reported that the jetbackup5d process is constantly being...

Create Destination Error: This destination path is already owned by other destination

On JetBackup 5, you may notice the following error when creating a destination that uses the same...

Common Backup Job Exclude List for DirectAdmin Accounts

Information regarding how to exclude certain files/folders from a backup in JetBackup 5 can be...