Last modified November 7, 2024

Backup Jobs

Learn how to configure and manage backup jobs, create schedules and account filters, and identify the backups on the destination.

Backup Jobs allows you to configure how JetBackup generates and manages your backups according to your backup job configuration. In this section, you will be able to create, modify and manage your Backup Jobs.

Create New Backup Job

To create a new backup job, click on "+ Create New Backup Job".

Example configuration page for the backup job:

Job Name

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

Creator

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

Destinations

Specify which destination(s) to transfer/store your generated backups to. You can find more details regarding supported destinations in the Destinations Overview section. Backup Jobs are able to backup to multiple destinations per job. LINK REF

Backup Type

JetBackup can perform the following types of backups. Here’s a brief explanation for each type:

  • Accounts - Copy files/folders from each account that you choose to include.
Account Backup Routine
  • Directories - Copy server files/folders that you choose to include (not necessarily related to user accounts).

Exclude Databases

You can choose to exclude databases from the backup job. The excludes can be set to have the backup job only exclude databases that exceed a selected size threshold. To modify which database size threshold to exclude, select Edit Excludes. A popup will appear allowing you to modify the database size threshold you would like to exclude.

Backup Structure

Backup structures tells how backups are generated and stored. JetBackup supports the following backup structures:

  • Incremental - Backup new and changed data since the previous backup.
  • Archived - Backup data in an uncompressed archive (.tar file format). Uncompressed backups are faster to generate but require more space.
  • Compressed - Backup data in a compressed archive (.tar.gz file format). Compressed backups use less space but take more time to generate.

Note: JetBackup 5 stores a Compressed/Archived Backup locally in the JetBackup Workspace before transferring to the destination. The minimal required space for these Backup Structures is 110% of the largest account.

For more information about the Backup structures supported for your destination, go to Destinations Overview.

Retry failed items

When enabled, the retry failed items option allows Jetbackup 5 to retry backing up any failed items during a backup job for one additional time.

Backup Naming Conventions

Backup directory names will differ, depending on two factors: Backup Type and Backup Structure

Backup Type Backup Structure
Name Backup Type
jetbackup_1_x_... Accounts
jetbackup_2_x_... Directories
Name Backup Structure
jetbackup_x_1_... Incremental
jetbackup_x_2_... Archived
jetbackup_x_4_... Compressed
JB Config Backup
jetbackup_3_4_... JetBackup configuration

Encrypted Backups

Choose whether or not backups will be encrypted on the backup destination. This option is only available with Archived and Compressed Backup Structure. Please note that users/accounts that opts for encrypted backups exclusively will be automatically excluded from all other backup jobs with encrypted backups disabled.

Account Filters

Account Filters allows you to specify conditions on which to include/exclude on you Backup Job(s). By default (no filters added), all accounts (active and suspended) are included in the backup 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 backup job.

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

Newly excluded accounts will NOT have their snapshots cleaned(deleted) automatically unless the snapshots are Orphan/Manual Snapshots. These snapshots will remain on the destination(s) until the account is included or the snapshots fall under the Delete orphan backups older than/Manual Backups TTL.

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 Backup Job configuration page.

Example configuration page for a new filter:

Filter Type

  • Accounts Filter - Specify which accounts to Include/Exclude in the backup job.
  • Resellers Filter * - Specify which reseller accounts (includes the reseller’s sub accounts) to Include/Exclude in the backup job.
  • Suspension Filter - Specify whether to Include/Exclude suspended accounts in the backup 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 backup job.
  • Inode Usage Filter ** - Filter accounts to Include Below/Above (or equals) a specified Inodes (files number) usage in backup job.
  • Packages Filter - Specify which accounts to Include/Exclude by cPanel Packages in the backup job.
  • Characters Range Filter - Specify which accounts to Include/Exclude by characters range in the backup job.
  • Regular Expression Filter - Specify which accounts to Include/Exclude by a regular expression pattern in the backup job.
  • Account Tags Filter - Specify which accounts to Include/Exclude based on the tags they are assigned.

Reseller Filters only affect the accounts that a reseller account owns, not the reseller account itself. Reseller accounts will be included in the affects of a Reseller Filter if the reseller account owns itself.

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).

Filter Name

Specify a unique name for your account filter(s). This will be used internally for your convenience.

Creator

Specify the creator for this account filter. This grants the creator and its parent account(s) permission to modify and delete this account filter. Please note that the creator specified will also need Can Manage Backup Jobs permission granted under the Permissions.

Filter Condition

Whatever to included or excluded accounts filtered by this filter.

Filter Examples

Examples of filter results where Filter 1 contains Account 1 & Account 3, and Filter 2 contains Account 2 & Account 3

Legend

  • ✅ Included in backup
  • ❌ Excluded from backup
Filter 1 Filter 2 Account 1 Account 2 Account 3 Others
Include AND Include
OR
AND Exclude
OR
Exclude AND Include
OR
AND Exclude
OR

Directories and Files to Include

Select which directories and files you would like to add to your Directories backup job. Click on “Select Files” to use the File Browser or “Insert Multiple” to add multiple paths manually. All includes are relative to the account home directory.

Directories and Files to Exclude

NOTE: Directories can be excluded on a per account basis rather than by Backup Job to provide more individualized control over exclusions. This is controlled in the Account Backup Jobs Excludes settings.

Excluding files & folders from backup is a very important feature, and we recommend to use it. Each backup 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.

All excludes are relative to the account home directory. So, different patterns can be used to exclude directories. i.e.

*/lscache/* : Exclude the lscache directory on any level, starting on the 2nd level

lscache/* or /lscache/* : Exclude the lscache directory on 1st level only

lscache/* or **/lscache/* or */lscache/* : Exclude the lscache directory on any level

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.

Exclude files and folders in bulk:

Here are some recommendations for files/folders to exclude.

*.bkup
*.gz
*.jpa
*.log
*.sql
*.tar
*.tar.gz
*.wpress
*.zip
*/.wysiwygPro_*
*/backupbuddy_backups/*
*/cache/smarty/*
*/com_akeeba/backup/*
*/core.[0-9]*
*/error_log
*/var/amasty_fpc/*
*/var/backups/*
*/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/*
backup-*.tar.gz
logs/*
public_ftp/*
public_/cache/*
site-*.tar.gz
softaculous_backups/*
tmp/*
lscache/*

Default Excludes

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

/etc/*/passwd
/etc/*/shadow
/etc/*/quota
/etc/*/@pwcache
/mail
/.cl.selector
/.cagefs
/.cpanel/email_accounts_count
/.cpanel/email_accounts.json
/imap
/.cagefs
/.cl.selector

Schedules

Backup Job Schedules tells JetBackup the time and frequency a backup job will be executed as well as the number of backups to keep for the corresponding schedule (backup retention).

JetBackup gives you the option to set multiple schedules for each backup job. There are no extra overhead between backups with multiple schedules running at the same time as JetBackup will automatically mark each coinciding backup with the appropriate schedule types.

Create Schedule

You may create and/or modify Backup Job schedule(s) through the schedules section under the Backup Job configuration or by navigating to “Backup Jobs” > “Manage Schedules” > "+ Create New Schedule".

Example configuration page for a 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 weehoose to execute the backup job.
  • Weekly - Will be executed once a week, on the day you choose to execute the backup job.
  • Monthly - Will be executed on the days of the month, from the 1st / 7th / 14th / 21st / 28th day you choose to execute the backup 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.

Schedule Hours

With an Hourly Schedule Type, you may choose to execute the backup 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 backup job. With a Monthly Schedule Type, you may choose to execute the backup job from 1st/7th/14th/21st/28th of the month.

Backup Retain

Backup Retain specifies how many backups 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 backup job.

Schedule Delay

With a After Backup/Clone/cPanel job is done Schedule Type, you may set how much time to delay a backup job in minutes/hours/days before executing the backup 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 backups for X Days
  • Notify me if backup runs more than X Days

Job Monitor Alerts will marked with the Critical Level.

Backup Job Settings

Click on the preferred Backup Job listed in the Backup Job section to expand and view the available backup job settings.

Enable Backup Job

Click on “Enable Backup Job” to toggle between enabling and disabling your backup job.

Manage Backup Job

Click on ‘Manage Backup Job’ to modify your backup job configuration.

Run Backup Job Now (Manual Backups)

Execute your Backup Job manually and on-demand.

Manually running backup jobs does not count towards your scheduled backup job rotation. To set the retention and TTL for manually executed backups, please visit Manual Backup Settings LINK REF.

View Backup Logs

Click on ‘View Backup Job’ to see Logs associated to the selected Backup Job.

Duplicate Backup Job

Click on ‘Duplicate Backup Job’ to make a copy of the selected Backup Job.

Delete Backup Job

Click on ‘Delete Backup Job’ to Delete your job permanently.

Additional Information

Backup Cleanup/Retention

During each (Manual and Scheduled) Backup Job run, JetBackup marks all backups which exceed the retention rate and files that need to be removed. These files will then be cleaned up and deleted during the Backup Cleanup and Integrity Check process. The Backup Cleanup & Integrity Check Schedule adjusts the frequency at which the process is run.

Note: The backups/files that are marked for deletion are not removed at the end of a backup job (Manual and Scheduled) and will remain on the destination until the Backup Cleanup and Integrity Check process runs. Therefore, there may be a temporary increase in disk usage until the Backup Cleanup and Integrity Check process is completed.

We recommend setting the Backup Cleanup & Integrity Check Schedule to allow the process to run more freuqently (minimum once per day) in order to minimize the amount of disk space used.

Optimizing your backups on supported destinations

“Point-In-Time” incremental backups - For retentions on incremental backups, JetBackup generates “point-in-time” incremental backups that use as little space as possible (using hard links). For example, on a 2GB DirectAdmin account with 30-day backup retention, it will only consume 2GB + 30 Days worth of new/changed data.

For databases, JetBackup generates a full dump of the databases for the initial incremental backup. If the databases are modified, JetBackup will then generate a new full dump for the incremental backup. Otherwise, the previous snap of the database dump will be used in the incremental backup.

Incremental Backup Job Behavior

  1. The Initial FIRST run of Incremental Backup Jobs may take a significantly longer time to finish as JetBackup generates the initial FULL Backup of your accounts.

  2. If a Backup Job remains processing and goes past its next expected schedule, JetBackup will recalculate the next run to the next “open” schedule upon completion.

  1. Please note that manually running a Backup Job does not count towards your Scheduled Backups. JetBackup will generate a separate set of Backups (including the initial Full Backup) for both the Manual and Scheduled runs of your Backup Job.

A symlink or Symbolic Link is simply a shortcut to another file or folder. It is a file/folder that points to another file/folder. You can think of Symlinks as shortcuts sometimes created by root users.

On destinations that utilize our jetindex engine (All non-legacy destinations), JetBackup does backup and restore symlinks in the home directory. This includes symlinks that point to a directory outside of the account’s home directory. Please note that for symlinks that lead outside of the account’s home directory, only the symlink will be included in the backup, and the files/folders ARE NOT included and therfore CANNOT be restored.

For legacy destinations (SSH, Local(legacy)), JetBackup will only restore symlinks that point to another file in the account’s home directory. Symlinks that point outside of the account’s home directory or to a separate mounted disk DO NOT get backed up and CANNOT be restored.

For both legacy and jetindex destinations, email accounts (files/folders) will be included in the backup regardless if the email contents are symlinked from a directory outside of the account’s home directory. When restored, the symlink will no longer exist, and the email account files/direcories will be in the account’s mail directory.

Why are my backups marked as damaged?

If any issues are discovered during the integrity check of the backups, JetBackup will label those snapshot(s) as “Damaged”. This indicates that one or more items in the selected backup are corrupted or did not transfer properly during backup and attempting to restore the account with these “Damaged” backups may result in unexpected errors/failures.

How to Verify if Backups Are Marked as “Damaged”

To determine if the backups are damaged, we must first run the Integrity Check. You may run the Integrity Check process manually by executing the command below.

jetbackup5api -F runIntegrityCheck

If the Integrity Check finds any issues with the backups, it will mark them as “Damaged”. Below are several methods to verify whether the backups have been labeled as “Damaged”

  1. On the JetBackup interface navigate to Accounts > Username > View Backups. From this point, you’ll be able to review if any backups were marked as “Damaged”.

  1. In the terminal, use the grep command to filter “found to be damaged” in the Integrity Check log files. The Integrity Check log files will be prefixed 64_LOGID.log

  2. Utilize the JetBackup API to execute the following command, listing all backups for an account that matches the specified Backup Type/Contains. Any damaged backup will be indicated as Damaged: 1 in the result.

jetbackup5api -F listBackupForTypeName -D "type=1&contains=511&account_id={$ACCOUNT_ID}&name={USERNAME}"

_id: 663e892e0490bd0d35025a15
    parent_id: 663e89260490bd0d350259d5
    account_id: 663675ba98c5c818fd0b34d3
    destination: 663e7f7d0f17de7b54086f22
    destination_name: localv2
    name: demo1
    created: 2024-05-10T20:52:54+00:00
    path:
    backup_type: 1
    backup_contains: 511
    account: demo1
    account_data:
      _id: 663675ba98c5c818fd0b34d3
      username: demo1
      owner: admin
      owner_id: 663675b998c5c818fd0b34d2
      package: undefined
      suspended:
      reseller:
      root:
    size: 281996
    params:
    backup_structure: 1
    notes:
    location:
    safety:
    deleted:
    lock:
    lock_ttl:
    damaged: 1 <<< Backup is damaged
    disabled:
    schedules:
      0: 8
    hidden:
    encrypted:
    encryption_id:
    encryption_key_required:
    encryption_key_exists: 1

JetBackup Priority Systems

Backup Queue and Concurrent Backup Jobs

In Jetbackup 5, the Queue utilizes a First in First out method in processing each tasks. It batches each tasks by its appropriate priority value across each Task Type (Backup, Restore, Download, Clone) and can simultaneously process tasks depending on the number of Concurrent Tasks set under Performance Settings.

Limitations

Invalid Characters

JetBackup can’t restore files and/or directories with certain special characters or permissions.

For a list of recommended special characters and file permissions to avoid, please visit: Characters to Avoid when naming Files and Folders