XP-Dev.com Documentation

Amazon S3 Backups

With all XP-Dev.com accounts, you can get real-time backups of your repositories sent to Amazon Simple Storage Service (S3).

How it works

Everytime you commit a changeset to your repository, XP-Dev.com will take an incremental backup and send it an S3 bucket that's owned by you.

XP-Dev.com will charge you $2/month to use this service and Amazon will charge you separately for using their service. With Amazon's pay-as-you-go pricing plans for S3, you only pay for what you store there.

Additionally, you can retrieve these backups at any time at your leisure.

Enabling Amazon S3 Backups

Payment

  • Head over to the Amazon S3 Backup page.
  • Pay for your service.
    • You can choose pay monthly or yearly. Yearly payments are entitled to a 20% discount and only cost $19.20/year.
    • Additionally, you can choose to pay each installment manually or automatically.
  • You will get an email once the subscription is active (takes a few seconds after payment for Paypal to process it).

Enable S3 Backups

(Optional) IAM User Policies

If you are using Amazon IAM to create a specific user for this integration, you should apply the following policies to that user.

(For the following policies, you should change <your-bucket-name> to the name of the bucket where backups should go into.)

  • Grant access to read & write objects and their ACLs, including listing objects in the bucket:

    "Action": [
        "s3:GetObject",
        "s3:GetObjectAcl",
        "s3:PutObject",
        "s3:PutObjectAcl"
    ],
    "Resource": [
        "arn:aws:s3:::<your-bucket-name>/*"
    ]
    
    "Action": [
        "s3:ListBucket"
    ],
    "Resource": [
        "arn:aws:s3:::<your-bucket-name>"
    ]
    
  • The following policies need to be granted for the initial setup and can be safely removed after:

    "Action": [
        "s3:GetBucketAcl",
        "s3:PutBucketAcl"
    ],
    "Resource": [
        "arn:aws:s3:::<your-bucket-name>"
    ]
    
    "Action": [
        "s3:ListAllMyBuckets"
    ],
    "Resource": [
        "arn:aws:s3:::*"
    ]
    
  • If you'd like us to create the bucket during initial setup, you will need to add the following policy as well:

    "Action": [
        "s3:CreateBucket"
    ],
    "Resource": [
        "arn:aws:s3:::<your-bucket-name>"
    ]
    

Configuration

  • Head back to the Amazon S3 Backup page.
  • Enter your Amazon AWS Access Key, AWS Secret Key, a bucket name and if it needs to be created.
    • XP-Dev.com does not store your keys, and will just use it to configure the bucket's permissions so that it can send files to it.

S3 settings

  • Once your bucket has been configured, you will see a list of repositories that you own.
  • Select the repositories and Trac projects you'd like to be backed up
  • Click on Save

S3 projects

  • Your backup files will be saved as keys in the following format: unique id/repository name/start revision/end revision
    • For example, if your repository called testrepo had a unique id 4890, then the backup revisions from 0 to 212 will be stored under 4890/testrepo/0/212

Disabling Amazon S3 Backups

  • Head over to the Amazon S3 Backup page.
  • Unselect the repositories that you don't want backed up
  • Click on Save

To stop the backups entirely and cancel the subscription, just raise a support ticket

XP-Dev.com will not delete any files from your bucket. If there's anything there that you don't want, you will have to delete it yourself.

Retrieving Backups

There are a dedicated project called XP-Dev.com Amazon S3 Backup Tools that has all the details on how to download your backups and even check that they are consistent.

Feel free to contact us if you need any assistance.