Clone Jobs

A Clone Job is a smart account cloning tool with 2 very distinct features. First, you can apply a recurring schedule so the cloning of the account can take place daily or even hourly if you want. Secondly, it is incremental in nature so that each recurring clone job that runs is only transferring over the new and updated files for each account.
  • JetBackup v5.2+ is required on both the source and destination servers.
  • JetBackup can only clone to servers that are equal or higher (>=) to the source version.
  • JetBackup will only copy the data to the failover server (Data is transferred one way only - from the source server out to the failover server)
  • If you initiated a failover - There is no automated way to sync back the data to the source server. Reverting back to the source server should be handled with caution and consideration.
  • JetBackup is only responsible for copying the data - TCP/IP Traffic Failover / Giveback should be handled externally (Floating IP, BGP Re-Route, DNS Failover etc..)
  • You may encounter issues when cloning across different panels due to differences in panel configurations and environments. Please work with a system administrator to review and ensure your server configurations/environment is as close to identical as possible to mitigate potential issues when cloning accounts.

The Clone Job Process is as follows:

  1. Packages the Account on the Source Server using the JetBackup 5 pkgacct script skipping the Home Directory Backup Item.
  2. Transfers the Account Backup to the Destination (Clone) server via Rsync
  3. Initially ONLY Restores the Account Panel Config Backup Item on Destination Server using the JetBackup 5 restorepkg script
  4. Restores remaining Account Backup Items (except Home Directory) on Destination Server using the JetBackup 5 restorepkg script
  5. Sync the Account Home Directory from the Source Server to Destination Server using Rsync

NOTE: In order to allow for Cross-Panel Clone Jobs, JetBackup 5 will automatically adjust the Account public_html directory to a unique public_html_migrated directory. Please ensure other custom directories can be used by the Panel on the Destination Server.

Create Clone Job

To create a new Clone Job, click on "+ Create New Clone Job"

Clone Jobs Page

Example configuration page for the Clone Job:

Clone Jobs Config

Job Name

Specify a unique name for your Clone Job. This will be used internally for your convenience.

Owner

Specify the creator for this Clone Job. This grants the creator and its parent account(s) permission to modify and delete this Clone Job. Please note that the owner specified (if not root) will also need Can Manage Clone Jobs permission granted under the Permissions section.

Destination

Choose a Clone Destination for this job. Please note that Clone destinations can only be created using the SSH Destination Plugin at this time. root-level access for the destination clone server required.

Clone Type/Contains

At this time, Clone Jobs can only clone Accounts from source to destination. JetBackup 5 is able to do this by using the JetBackup 5 restorepkg CLI Tool on the Destination server to restore the account. A Clone Job will automatically contain all Account information by default.

You can choose to include/exclude the following:

  • Panel Configurations
  • Home directory Files
  • Databases *
  • Database Users
  • Email Accounts/Structure **
  • FTP Accounts
  • Cron Jobs
  • DNS Zones
  • SSL Certificates

* Databases are regenerated and synced to the destination. Each job run will add the disk usage of each database dump file to the clone.

** When choosing the option to clone only email structure, the clone will contain the email account structure without the email content.

Default Owner/Package

Since the accounts are being cloned to a new/failover server, you have the option to apply a Default Owner/Package to the account upon Clone. Leave these fields blank to use the live account Owner/Package already set.

Suspend Account

The Suspend Account option allows JetBackup to suspend the cloned account on the destination server during the Clone Job.

NOTE: Some panels may not allow accounts to utilize Panel API when suspended. JetBackup 5 relies on the Panel API to properly restore the Account Items to the destination server.

Account Filters

Account Filters allows you to specify conditions on which to include/exclude on you Backup Job(s). By default, all accounts are included in the clone job. Multiple filters may also be applied and are combined by AND/OR statements.

AND - the condition on EACH filter(s) must be met in order for an account to be included in the clone job.

OR - the condition on EITHER filter(s) must be met in order for an account to be included in the clone job.

Create Account Filters

In order to create an account filter, either click on "Manage Account Filters" > "+ Create New Filter" or through the Account Filters section under the Clone Job Configuration page.

Example configuration page for a new filter:

create new account filter


Filter Type

  • Accounts Filter - Specify which accounts to Include/Exclude in the clone job.
  • Resellers Filter - Specify which reseller accounts (includes the reseller's sub accounts) to Include/Exclude in the clone job.
  • Suspension Filter - Specify whether to Include/Exclude suspended accounts in the clone job.
  • Encrypted Filter - Filter accounts to Include/Exclude based on whether they have Encrypted Backups Only enabled.
  • Disk Space Usage Filter - Filter accounts to Include Below/Above (or equals) a specified disk space usage in the clone job.
  • Inode Usage Filter * - Filter accounts to Include Below/Above (or equals) a specified Inodes (files number) usage in clone job.
  • Packages Filter - Specify which accounts to Include/Exclude by cPanel Packages in the clone job.
  • Characters Range Filter - Specify which accounts to Include/Exclude by characters range in the clone job.
  • Regular Expression Filter - Specify which accounts to Include/Exclude by a regular expression pattern in the clone job

* In order to use the Inode Usage Filter, your server/control panel must support a method for JetBackup to obtain inode usage (such as repquota).


Directories and Files to Exclude

Excluding files & folders from clone is a very important feature, and we recommend to use it. Each clone job has it's own exclude list that can be specified and modified. The exclude list will be piped to our sync operation. The supported path format should be in glob pattern.

Specify a file/folder path on the field and click on "Add Path" to add on the exclude list or click on "Insert Multiple" to exclude in bulk.

insert excluding files

Exclude files and folders in bulk:

insert excluding multiple

Here are some recommendations for files/folders to exclude.

*.bkup
*.gz
*.jpa
*.log
*.sql
*.tar
*.tar.gz
*.wpress
*.zip
*/.wysiwygPro_*
*/clonebuddy_clones/*
*/cache/smarty/*
*/com_akeeba/clone/*
*/core.[0-9]*
*/error_log
*/var/amasty_fpc/*
*/var/clones/*
*/var/cache/*
*/var/debug/*
*/var/export/*
*/var/import/*
*/var/log/*
*/var/report/*
*/var/session/*
*/var/tmp/*
*/wp-content/cache/*
*/wp-content/wphb-cache/*
*/wp-content/uploads/wpcf7_captcha/*
*/wp-content/widget-cache/*
*/wptsc-cachedir/*
.MirrorSearch
.cpanel/*.sock
.trash
access-logs/*
clone-*.tar.gz
logs/*
public_ftp/*
public_html/cache/*
site-*.tar.gz
softaculous_clones/*
tmp/*

Default Excludes

JetBackup 5 has certain files and folders that are excluded by default depending on the panel installed. Please see the lists below to see which files and folders are excluded from all Accounts Backup Job.


Schedules

Clone Job Schedules tells JetBackup the time and frequency a clone job will be executed.

JetBackup gives you the option to set multiple schedules for each clone job.

Create Schedule

You may create and modify schedule(s) through the Clone Job Configuration.
Example configuration page for a new schedule:

create new schedule

Schedule Name

Specify a unique name for your schedule. This will be used internally for your convenience.

Schedule Type

  • Hourly - Will be executed every X hours.
  • Daily - Will be executed on the days of the week you choose to execute the clone job.
  • Weekly - Will be executed once a week, on the day you choose to execute the clone job.
  • Monthly - Will be executed on the days of the month, from the 1st / 7th / 14th / 21st / 28th day you choose to execute the clone job.
  • After Backup job is done - The job depends on another Backup job to be finished, only then it will be executed. When this option is chosen, you can also set a "delay" in minutes/hours/days to wait before starting.
  • After Clone Job Done - The job depends on another Clone Job to be finished, only then it will be executed. When this option is chosen, you can also set a "delay" in minutes/hours/days to wait before starting.

To safely change between schedule types, please add a new schedule on top of your existing schedule(s) and give your clone job ample time (the full retention length of your new schedule) to generate and correctly mark clones with the appropriate schedule type(s). You can then safely remove the previous schedule once the clone job runs for one full cycle of your retention.

Schedule Hours

With an Hourly Schedule Type, you may choose to execute the clone job every one/two/three/four/six/eight/twelve Hours.

Schedule Days

With a Daily/Weekly Schedule Type, you may choose which day(s) of the week to execute the clone job. | With a Monthly Schedule Type, you may choose to execute the clone job from 1st/7th/14th/21st/28th of the month.

Backup Retain

Backup Retain specifies how many clones to keep with the corresponding schedule type. |

Schedule Time

With an /Daily/Weekly/Monthly Schedule Type, you may specify the time of day (based on your server local time) on when to execute the clone job. |

Schedule Delay

With a After Backup/Clone Job is done Schedule Type, you may set how much time to delay a clone job in minutes/hours/days before executing the clone job.

Schedule Time

The time that you want all schedules to be executed.

Monitor

The Backup Job monitor is a feature that will allow JetBackup 5 to send alerts to your configured Notification Integrations for each of the following conditions:

  • Notify me if there were no clone for X Days
  • Notify me if clone runs more than X Days

Job Monitor Alerts will marked with the Critical Level.

Clone Job Actions

Click on the preferred Clone Job listed in the Backup Job section to expand and view the available Clone Job Actions.

Clone Job Actions


Enable Clone Job

Click on "Enable Clone Job" to toggle between enabling and disabling your clone job.

Manage Clone Job

Click on 'Manage Clone Job' to modify your :ref: clone job configuration<creat clonejob>`.

Run Clone Job Now

Execute your Clone Job manually and on-demand.

View Backup Logs

Click on "View Clone Job" to see Logs associated to the selected Clone Job.

Duplicate Backup Job

Click on "Duplicate Clone Job" to make a copy of the selected Backup Job.

Delete Backup Job

Click on "Delete Clone Job" to Delete your job permanently.


Additional Information

Logs

To minimize the amount of memory usage, the clone job logs from the source server will include the path to the restore logs from the destination clone server instead of the full log output. You will be able to view the full restore log only from the clone server.

Updating Clone Packages

By default, the initial clone for each account will be assigned its corresponding original package to its clone destination. If the package changes for an account on the source server, the account on the clone destination will remain on its old package. To ensure that the packages for accounts on the clone destination is updated properly, kindly set the Restore package selection on the Clone server from "Live Account Package" to "Backed up package".

Clone Job Restore Package | | |