Last modified November 7, 2024

manageCloneJob

This function allows you to create/modify the Clone Job Object.
Parameter name Type Description Possible values Example
action String REQUIRED Sets the flag to either create or modify. create/modify action=create
_id String REQUIRED on action modify. The Clone Job ID.   _id=5f8a7d0d348232507c4e7f02
type Integer REQUIRED on action create. The Clone Type. View all possible Clone Types below. type=1
name String REQUIRED on action create. The name given to the Clone Job for internal use.   name=Daily Clone
destination List [] REQUIRED on action create. List of the Destination IDs you will perform clones to. Must be a Clone Destination Type.   destination[0]=5fcedb7e4caee42621624bc2
contains Integer REQUIRED on action create. Value indicating what the backup contains. View all possible Contains Values below. contains=511
default_owner String The default owner you would like to set for your account for the Destination Server. If left blank, JetBackup will try to use the live owner.   default_owner=root
default_package String The default package you would like to set for your account for the Destination Server. If left blank, JetBackup will try to use the live package.   default_package=user
Owner String Owner of the Clone Job. The owner and his parent will have permissions to modify/delete this destination   owner=admin
monitor List [] Set the values for the Clone Job Monitor. (0: disabled)
  • ranfor: (int) days
  • notran: (int) days
monitor[ranfor]=1&monitor[notran]=2
Disabled Boolean Flag to know if a Clone Job is Disabled 1/0  

Example Call JETAPI

jetbackup5api -F manageCloneJob -D \
"action=create&\
name=API Clone Job&\
owner={$OWNER_ACCOUNT_ID}&\
owner_name={$OWNER_ACCOUNT_NAME}&\
destination[0]={$DESTINATION_ID1}&\
type=1&\
contains=511&\
structure=1&\
filters[0][0]={$GROUP_FILTER_ID1}&\
filters[1][0]={$GROUP_FILTER_ID2}&\
filters[1][1]={$GROUP_FILTER_ID3}&\
exclude_list[0]=.MirrorSearch&\
exclude_list[1]=*/.wysiwygPro_*&\
exclude_list[2]=*/core.[0-9]*& \
schedules[0][_id]={$SCHEDULE_ID1}&\
schedules[0][retain]=5&\
schedules[1][_id]={$SCHEDULE_ID2}\
schedules[1][retain]=5&\
time=2330&\
monitor[ranfor]=1&\
monitor[notran]=1
success: 1
message: Clone Job Created Successfully
system:
  version: 5.3.3
  version_panel: 5.3.3
  tier: STABLE
  type: cPanel
  retry_ms: 0
  disableui:
  dr:
  agreement_panel:
  agreement:
  licenseIssue:
data:
  _id: 6505d2adf947d135e236c502
  name: clonetest
  destination:
    0: 6505d08d5cde724d10441b52
  destination_details:
    0:
      _id: 6505d08d5cde724d10441b52
      name: clone
      owner: 64f37d695aa01f55661b38f2
      owner_name: root
      type: Clones
      job_type: 2
      count: 1
      hidden:
      readonly:
      disabled:
      disk_limit: 95
      disk_usage:
      threads: 10
      update_date: 2023-09-16T15:58:08+00:00
      dr:
      reindex:
      running:
      options:
        password: JB|HIDDEN|********************
        privatekey:
        host:
        port:
        timeout: 60
        rsyncpreferip: 0
        rsyncbwlimit: 0
        internalprivatekey:
  type: 1
  contains: 511
  options: 0
  state: 0
  owner: 64f37d695aa01f55661b38f2
  owner_name: root
  next_run:
  last_run:
  running:
  disabled: 0
  time: 2000
  monitor:
    ranfor: 0
    notran: 0
  manually_retain: 0
  exclude_list:
  schedules:
  hooks:
  default_package:
  default_owner:
  suspend_after: 0
  filters:`

Example Call HTTP

https://hostname.example.com:2087/cpsess##########/cgi/addons/jetbackup5/api.cgi?function=manageCloneJob&action=modify&type=1