Backup System Files

Backup Server Config Files/Directories

Besides accounts, JetBackup can also backup generic system files & folders on the server. This is very useful if you want to backup important files and server config files that are not directly related to panel accounts.

In order to backup specific files/folders from your cPanel server, you need to choose a "Directories" backup type. For more information on Directories Backup Jobs, click here.

In the following screenshot, we created a Compressed Directories job that will backup important config files on a cPanel server. This backup job is also scheduled to be executed right after a our full account backup job finishes using the After Backup Job Done schedule type.

When selecting the Archived/Compressed Backup structure, you also have the option to enable the Encrypted Backups option so the backups are encrypted before transfer to the destination.

Backup system files

cPanel Include List

Here is a base list of files/folders we recommend to include on your backup job on cPanel/WHM servers. This is a generic list -- please see the next section if you'd like to generate a list automatically that's unique to your cPanel version/setup.

/etc/cpanel
/etc/proftpd
/etc/ssl
/etc/valiases
/etc/vdomainaliases
/etc/vfilters
/usr/local/cpanel/3rdparty/mailman
/var/cpanel
/var/lib/rpm
/var/lib/mysql
/var/named
/var/spool/cron
/etc/dovecot
/etc/exim.conf
/etc/exim.conf.local
/etc/exim.conf.localopts
/etc/fstab
/etc/group
/etc/httpd/conf/httpd.conf
/etc/ips
/etc/localdomains
/etc/mail/sni/map
/etc/my.cnf
/etc/named.conf
/etc/passwd
/etc/pure-ftpd.conf
/etc/quota.conf
/etc/remotedomains
/etc/reservedipreasons
/etc/reservedips
/etc/rndc.conf
/etc/secondarymx
/etc/shadow
/etc/wwwacct.conf
/root/.my.cnf
/usr/local/apache/conf/httpd.conf
/etc/sysconfig/network-scripts
/etc/rc.d/rc.local
/etc/sysconfig/network
/etc/resolv.conf

Using cPanel/WHM, you can generate a comprehensive list of ALL potential system files/configs on a cPanel/WHM environment. Please note that each individual cPanel server may vary depending on the software/features you have installed and NOT all paths in the Include/Exclude list generated may exist on your server.

The following command will generate a generic list of files and folders to INCLUDE in your backup job.

/usr/local/cpanel/3rdparty/bin/perl -MCpanel::Backup::SystemResources -MData::Dumper -e'print Dumper( Cpanel::Backup::SystemResources::get_resource_paths() )' | awk '/\//{print $1}' | tr -d "\'",","

The following command will generate a generic list of files and folders to EXCLUDE from your backup job.

/usr/local/cpanel/3rdparty/bin/perl -MCpanel::Backup::SystemResources -MData::Dumper -e'print Dumper( Cpanel::Backup::SystemResources::get_excludes_args_by_path("/var/cpanel") )' | awk '{print "/var/cpanel/" substr($3,12)}' | cut -d\' -f 1

DirectAdmin Include List

Here is a list of files/folders that are normally included with DirectAdmin's built-in "System Backup". This is a generic list -- Please note that each individual DirectAdmin server may vary depending on the software/features you have installed and NOT all paths in the generic Include List may exist on your server. Additionally, custom configuration/setup of DirectAdmin may include extra files/folders that are NOT listed.

/etc/bind
/etc/dovecot
/etc/exim.cert
/etc/exim.conf
/etc/exim.key
/etc/exim.pl
/etc/group
/etc/gshadow
/etc/hosts
/etc/httpd
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/ips.conf
/etc/mail
/etc/master.passwd
/etc/named.conf
/etc/nginx
/etc/my.cnf
/etc/passwd
/etc/proftpd.conf
/etc/proftpd.passwd
/etc/proftpd.vhosts.conf
/etc/resolv.conf
/etc/shadow
/etc/ssh/sshd_config
/etc/system_filter.exim
/etc/virtual
/home/admin
/usr/lib/apache
/usr/local/directadmin/scripts/custom/
/usr/local/directadmin/conf/mysql.conf
/usr/local/directadmin/conf/directadmin.conf
/usr/local/directadmin/data
/usr/local/frontpage
/usr/share/ssl
/var/log
/var/mail
/var/named
/var/spool/cron
/var/spool/mail
/var/spool/virtual
/var/www