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!

Older backups not deleted

Discussion in 'Data Protection' started by Nilesh Toshniwal, Apr 2, 2018.

Tags:
  1. Nilesh Toshniwal

    Joined:
    Nov 30, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    india
    cPanel Access Level:
    Root Administrator
    Hi

    I have configured backup system to maintain 3 daily and 2 monthly backups, but when backup cron runs its not deleting older backups and I have to manually delete older backups after every few days to free up disck space, I have attached screenshot of my backup configuration page.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,389
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you review the most recent backup log in the /usr/local/cpanel/logs/cpbackup/ directory and let us know if you notice any error messages during the backup process?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Nilesh Toshniwal

    Joined:
    Nov 30, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    india
    cPanel Access Level:
    Root Administrator
    as far as I can see the backups are generated fine if disk space is available, and I see some errors like permission denied a sample error is given below:

    /home/freebizm/public_html/error_log: Cannot open file: Permission denied at bin/pkgacct.pl line 1474.
    [2018-04-03 07:36:36 +0530] /home/freebizm/public_html/contributing.md: Cannot open file: Permission denied at bin/pkgacct.pl line 1474.
    [2018-04-03 07:36:36 +0530] /home/freebizm/public_html/fonts: Cannot open file: Permission denied at bin/pkgacct.pl line 1474.
    [2018-04-03 07:36:36 +0530] /home/freebizm/public_html/.htaccess: Cannot open file: Permission denied at bin/pkgacct.pl line 1474.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,389
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you check the permission and ownership values of the files referenced in the logs to ensure the backup process is able to package them? It's likely the files are owned by another user, or set to read-only permissions. EX:

    Code:
    stat /home/$username/public_html/error_log
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Nilesh Toshniwal

    Joined:
    Nov 30, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    india
    cPanel Access Level:
    Root Administrator
    Yes file permissions are set to read only, this is done to increase security of websites from hackers, but I think backup process is performing read operations only for the files, and files are publicly readable but not writable by anyope, also the location where backup is stored is writable thats why it can write the backup files
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,389
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Backups run as the account username when generated, and thus need to be able to access those files or the backup process will fail. Can you verify the specific permissions assigned to those files?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Nilesh Toshniwal

    Joined:
    Nov 30, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    india
    cPanel Access Level:
    Root Administrator
    We set permissions as 544 so its readable by everyone but not writable by anyone and it can be executed by owner ($username) only.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,389
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    0544 permissions shouldn't prevent the backup process from including a file in the archive. Can you run the following commands for one of the affected files and let us know the output? EX:

    Code:
    stat /home/user/public_html/contributing.md
    lsattr /home/user/public_html/contributing.md
    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