How to backup additional system folders

jceja

Member
Dec 11, 2017
6
1
3
Mexico
cPanel Access Level
Root Administrator
I would like to make cpanel backup additional files, in specific, gitlab's config and repo files.

I found this

System Backups - Documentation - cPanel Documentation

But I don't understand, I should go to
Code:
/var/cpanel/backups/extras
and just create empty folders of the folders I'd like to backup? IE. create
Code:
/var/cpanel/backups/extras/etc/gitlab
Or how's the best way I could backup those files, thanks!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello,

The name of the configuration file within the /var/cpanel/backups/extras/ directory is irrelevant. For example, I created the following file:

/var/cpanel/backups/extras/123

Here's the contents of this file:

Code:
# cat /var/cpanel/backups/extras/123
/etc/gitlab/
Upon the next backup generation, this lead to the successful inclusion of the entire /etc/gitlab/ directory as a compressed file within the /backup/$date/system/dir/ directory. If you want to define specific files instead of the entire directory, the /var/cpanel/backups/extras/123 file would look like this:

Code:
# cat /var/cpanel/backups/extras/123
/etc/gitlab/path/to/file.name
/etc/gitlab/path/to/file2.name
/etc/gitlab/path/to/file3.name
Thank you.