Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to backup additional system folders

Discussion in 'Workarounds and Optimization' started by jceja, Dec 11, 2017.

Tags:
  1. jceja

    jceja Registered

    Joined:
    Dec 11, 2017
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    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!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  3. jceja

    jceja Registered

    Joined:
    Dec 11, 2017
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Thank you very much, just to be sure, this is what I did:


    Code:
    [/var/cpanel/backups/extras]# cat gitlab
    /var/opt/gitlab/
    /etc/gitlab/
    
    I'll check it out when the backup job does it's thing
     
    cPanelMichael likes this.
Loading...

Share This Page