You are here

Backups on Amazon S3 or Google Storage

Submitted by Alan Mels on Fri, 03/29/2019 - 20:07
  1. Create a bucket on https://console.aws.amazon.com/s3/home or Google Storage on https://console.cloud.google.com/storage/browser
  2. Go to https://console.aws.amazon.com/iam/home?#users and create a user.
  3. Click on User > Inline Policy > Custom Policy and add:
    1. {
    2. "Version": "2012-10-17",
    3. "Statement": [
    4. {
    5. "Effect": "Allow",
    6. "Action": "s3:ListAllMyBuckets",
    7. "Resource": "arn:aws:s3:::*"
    8. },
    9. {
    10. "Effect": "Allow",
    11. "Action": [
    12. "s3:ListBucket",
    13. "s3:GetBucketLocation"
    14. ],
    15. "Resource": "arn:aws:s3:::cid1149"
    16. },
    17. {
    18. "Effect": "Allow",
    19. "Action": [
    20. "s3:PutObject",
    21. "s3:GetObject",
    22. "s3:DeleteObject"
    23. ],
    24. "Resource": "arn:aws:s3:::cid1149/*"
    25. }
    26. ]
    27. }

    replacing cid1149 with respective customer id.

  4. Click on user > Security Credentials and create new Access and Secret Keys; delete the old one
  5. Schedule a Virtualmin backup clicking on the "Add another destination .." option and making sure not to select the "Include sub-servers of those selected?" option of the existing local backup like shown in the attached screenshot:

    - for "Bucket and path" option put cid1283/weekly-%d-%m-%Y;
    - check on the "Use reduced redundancy storage?" option;
    - for the "Delete old backups" option choose 15 days for daily backups and 30 days for weekly backups.

Clients can login through https://drupion.signin.aws.amazon.com/console


0) Install pip and aws cli

yum install python-pip
pip install --upgrade pip
pip install awscli --upgrade