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!

Backups, include custom directory doesn't work

Discussion in 'Data Protection' started by ITGabs, Apr 5, 2016.

  1. ITGabs

    ITGabs Well-Known Member

    Joined:
    Jul 30, 2013
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    from the documentation: Backup Configuration - Documentation - cPanel Documentation

    "To configure system backups to include custom files or directories, create a new file or directory in the /var/cpanel/backups/extras directory (for example, /var/cpanel/backups/extras/etc). In that file, enter an absolute path to any files that you wish to back up (for example, /etc/example.conf)."

    I tried to add the csf folder adding /etc/csf and doesn't work
    I also tried with /etc/csf/
    /etc/csf/*
    _etc_csf
    also other weird tests

    for files work ok

    More data
    I am using the "backup"/usr/local/cpanel/bin/backup --force
    not "legacy backup" /scripts/cpbackup --force

    cp version 54.0 (build 21)
    backups type incremental mounted in /backups

    Question
    How can I add /path/to/directory to the backups instead of file by file?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,827
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    I've been unable to reproduce the issue you have reported. Here are the steps I took:

    1. Created the "/etc/csf" directory and created a few test files within this directory:

    Code:
    [/]# ls /etc/csf
    ./  ../  123  456  789
    2. Created a file in the "/var/cpanel/backups/extras/" directory:

    Code:
    touch /var/cpanel/backups/extras/etc
    3. Edited this file and added a line for the "/etc/csf" directory:

    Code:
    # cat /var/cpanel/backups/extras/etc
    /etc/csf
    
    4. Browsed to "WHM >> Backup Configuration" and ensured "Backup System Files" was enabled.

    5. Forced a local backup generation via "/usr/local/cpanel/bin/backup --force" and browsed to the following directory:

    Code:
    /backup/$date/system/dir/
    6. Extracted the /backup/$date/system/dir/_etc_csf.tar.gz archive and confirmed the individual files referenced in step one were included.

    Are you following these same steps?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ITGabs

    ITGabs Well-Known Member

    Joined:
    Jul 30, 2013
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi,

    Checking the files today in system/dirs noticed that _etc_csf and _etc_csf_ were there and other tests also.

    well now it's working, i am not sure if i did something wrong or if is something related to --force with the incremental option on.

    Also the backups logs looks clean, not sure if this have something related to the problem
    nfo [backup] Setting I/O priority to reduce system load: best-effort: prio 6
    lstat() on filehandle $_[...] at /usr/local/cpanel/Cpanel/Autodie.pm line 414.


    Thanks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,827
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I am happy to see the issue is now resolved. Note the use of the "--force" flag or incremental backups should not affect the behavior of system backup file generation.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice