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.

Amazon S3 Backup retention

Discussion in 'Data Protection' started by benito, Jun 14, 2014.

  1. benito

    benito Well-Known Member

    Joined:
    Jan 8, 2004
    Messages:
    296
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Mar del Plata - Argentina
    Hello!

    I noted that my backup retention number is ignored. I choose to retain only 2 daily backups but i see on amazon all backups are keept.

    How can i debug this?

    Thanks
     
  2. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Your access level isn't listed on this forum. Do you have full root access to the server? If so, please review the log files in:

    Code:
    /usr/local/cpanel/logs/cpbackup/
    
    Specifically look for the word "Pruning" and see if there are errors related to that.

    If you don't have access to the server via SSH, then you'll need to discuss this with your data center.
     
  3. benito

    benito Well-Known Member

    Joined:
    Jan 8, 2004
    Messages:
    296
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Mar del Plata - Argentina
    Thanks Peter, im the administrator of this server.

    Looking on the logs i only find one occurence of Pruning. Its one of the last lines and it says:

    [backup] pruning backup directory: /backup/2014-06-09

    But on Amazon, the folder 2014-06-09 still exist.

    Im not sure if this is a problem, but i do not have any "backup" folder on amazon. This is the folder structure of my bucket. Daily backups on root and a monthly folder.

    [​IMG]
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I believe we could provide a more accurate answer if we were able to review your existing setup and see what's happening. Could you open a support ticket so we can take a closer look? You can provider the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  5. benito

    benito Well-Known Member

    Joined:
    Jan 8, 2004
    Messages:
    296
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Mar del Plata - Argentina
    Thanks Michael, the ticket id is: 5106031
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To update, the user is running some tests to see if the issue is related to settings/processes on their remote Amazon S3 server. Please feel free to update us with the outcome.

    Thank you.
     
  7. dto123

    dto123 Member

    Joined:
    Jun 28, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Toronto
    cPanel Access Level:
    Website Owner
    Was there any update on this?
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The user found an issue with the permissions they were assigning to Amazon users on each server.

    Thank you.
     
  9. benito

    benito Well-Known Member

    Joined:
    Jan 8, 2004
    Messages:
    296
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Mar del Plata - Argentina
    Hi!

    I was using this policy for the users with access to the bucket.

    Code:
    {
       "Statement":[
          {
             "Effect":"Allow",
             "Action":[
                "s3:ListAllMyBuckets"
             ],
             "Resource":"arn:aws:s3:::*"
          },
          {
             "Effect":"Allow",
             "Action":[
                "s3:ListBucket",
                "s3:GetBucketLocation"
             ],
             "Resource":"arn:aws:s3:::you_bucket_name"
          },
          {
             "Effect":"Allow",
             "Action":[
                "s3:PutObject",
                "s3:GetObject",
                "s3:DeleteObject"
             ],
             "Resource":"arn:aws:s3:::you_bucket_name/*"
          }
       ]
    }
    And after some testing i ended using this policy, less restrictive.

    Code:
    {
        "Statement": [
            {
                "Effect": "Allow",
                "Action": "s3:ListAllMyBuckets",
                "Resource": "arn:aws:s3:::*"
            },
            {
                "Effect": "Allow",
                "Action": "s3:*",
                "Resource": [
                    "arn:aws:s3:::bucket_name",
                    "arn:aws:s3:::bucket_name/*"
                ]
            }
        ]
    }
     
  10. keencs

    keencs Member

    Joined:
    Feb 16, 2013
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Was this policy effective in allowing your backups to be pruned? I am experiencing the same problem. I have implemented the policy changes you suggested without success. Previous research for me indicated that pruning on S3 was not yet supported by cPanel backups. Has it been confirmed that it is?

    Ryan
     
  11. benito

    benito Well-Known Member

    Joined:
    Jan 8, 2004
    Messages:
    296
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Mar del Plata - Argentina
    Yes, my backups are prunning correctly.
     
Loading...

Share This Page