In this guide, I will be setting JetBackup5 on a new server, with a remote (SSH) destination, and scheduling daily cPanel backups.
The following should be already created:
- JetBackup5 license is activated for the server IP
- SSH account created on the remote destination server
Install JetBackup5
Enable the JetApps repository:
bash <(curl -LSs http://repo.jetlicense.com/static/install)
Install JetBackup 5 on cPanel server:
jetapps --install jetbackup5-cpanel stable
![Setting up automatic cPanel backups with JetBackup5 image 31 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-31.png?resize=659%2C122&ssl=1)
Navigate to WHM > JetBackup5 and accept the license:
![Setting up automatic cPanel backups with JetBackup5 image 32 1024x517 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-32.png?resize=736%2C372&ssl=1)
Select New installation, then OK, and finally Finish button.
![Setting up automatic cPanel backups with JetBackup5 image 33 1024x517 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-33.png?resize=736%2C372&ssl=1)
Enable SSH plugin
In JetBackup5 you need first to install a plugin to use SSH as remote destination.
From WHM > JetBackup >Plugins click on Available plugins.
![Setting up automatic cPanel backups with JetBackup5 image 22 1024x697 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-22.png?resize=736%2C501&ssl=1)
Find the SSL plugin and click on Install, then OK
![Setting up automatic cPanel backups with JetBackup5 image 23 1024x464 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-23.png?resize=736%2C334&ssl=1)
then on Enable plugin.
![Setting up automatic cPanel backups with JetBackup5 image 24 1024x455 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-24.png?resize=736%2C327&ssl=1)
Now that the SSH plugin is active, We can add our destination server.
Create a new SSH destination
From JetBackup click on Destinations and Create a New Destination.
![Setting up automatic cPanel backups with JetBackup5 image 25 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-25.png?resize=736%2C350&ssl=1)
Set destination type to SSH
![Setting up automatic cPanel backups with JetBackup5 image 26 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-26.png?resize=736%2C159&ssl=1)
Fill in the server name:
![Setting up automatic cPanel backups with JetBackup5 image 27 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-27.png?resize=413%2C46&ssl=1)
If you will be storing backups on this remote server from multiple servers, set also the directory:
![Setting up automatic cPanel backups with JetBackup5 image 28 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-28.png?resize=491%2C67&ssl=1)
Then fill in the SSH login details:
![Setting up automatic cPanel backups with JetBackup5 image 29 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-29.png?resize=417%2C214&ssl=1)
I recommend creating a new SSH user that will be used exclusively for backups. Also for authentication, I recommend using a private key.
Save the settings and the new destination will be validated:
![Setting up automatic cPanel backups with JetBackup5 image 30 1024x405 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-30.png?resize=736%2C291&ssl=1)
Create a new Backup job
After the destination is added, We can create a new backup job to enable automatic backups.
Create a new Backup Job and set the following:
- Name for the destination
- Destination: Newly created SSH remote destination
![Setting up automatic cPanel backups with JetBackup5 image 38 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-38.png?resize=736%2C585&ssl=1)
Create a new Account filter to exclude suspended accounts:
![Setting up automatic cPanel backups with JetBackup5 image 36 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-36.png?resize=736%2C386&ssl=1)
I also recommend excluding archives, cache, and backup directories:
![Setting up automatic cPanel backups with JetBackup5 image 37 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-37.png?resize=736%2C165&ssl=1)
Click on Insert Multiple and just paste these files:
/tmp/*
/.cpanel/*
*/error_log*
/public_ftp/*
*/*.log*
backup-*.tar.gz
cpmove-*.tar.gz
site-*.tar.gz
public_html/cache/*
softaculous_backups/*
*/wp-content/cache/*
/wp-content/backups/*
/wp-content/updraft/*
/wp-content/ai1wm-backups/*
and set the Schedule, in this example, I will set the backups to run daily and save up to 8 backups for each account.
![Setting up automatic cPanel backups with JetBackup5 image 39 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-39.png?resize=736%2C230&ssl=1)
Additional Recommended Jetbackup5 settings
Here are a few recommended JetBackup5 settings:
Change JetbaCkup5 folders
I recommend changing the JetBackup5 Workspace and Downloads directories (that jb5 uses to download and create backups) to something other than /usr – in most cases you should use /home
First copy the current folders:
cp -a /usr/local/jetapps/usr/jetbackup/workspace /home/backupjb
cp -a /usr/local/jetapps/usr/jetbackup/downloads /home/downloadjb
Then navigate to Settings > General and change them both:
![Setting up automatic cPanel backups with JetBackup5 image 40 1024x523 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-40.png?resize=736%2C376&ssl=1)
to
![Setting up automatic cPanel backups with JetBackup5 image 41 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-41.png?resize=736%2C166&ssl=1)
then save the settings.
Limit CPU and IO usage
It is possible that Jetbackup uses all available resources if not limited, so make sure to limit CPU and IO usage accordingly to your server hardware:
![Setting up automatic cPanel backups with JetBackup5 image 42 1024x507 - Setting up automatic cPanel backups with JetBackup5](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/11/image-42.png?resize=736%2C364&ssl=1)
Change Postgre Configuration
To avoid errors when backing up postgre databases, you should change the default pg_hba.conf file:
nano /var/lib/pgsql/data/pg_hba.conf
and change
host samerole all ::1/128 md5
to
host all all ::1/128 md5
Save, then restart Postgres and JetBackup:
service postgresql restart
service jetbackup5d restart