How to Create Amazon S3 Backups with InterWorx

SiteWorx backup .tar.gz files may be transferred upon creation to Amazon Simple Storage Service (Amazon S3) or an Amazon S3 compliant object store.

More information on Amazon S3 can be found here.

Note

This option is only available via the CLI. There is no GUI interface for Amazon S3 backups at this time.

To Set Up Amazon S3 Backups

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. Using a text editor, create a file named /root/tmp_creds and update it with the Amazon S3 account credentials

    [root@server ~]# cat /root/tmp_creds
    aws_access_key_id=XXX
    aws_secret_access_key=YYYYYYY
    [root@server ~]#
    
  3. Create an Amazon S3 profile

    ~iworx/bin/s3.pex --configure --credential-file /root/tmp_creds --profile {profile_name} --region {region}
    
    • Alternatively, create a profile for an Amazon S3-compliant service

      ~iworx/bin/s3.pex --configure --credential-file /root/tmp_creds --profile {profile_name} --endpoint {https://objects.domain.tld}
      
  4. Create a bucket (if needed)

    ~iworx/bin/s3.pex --create-bucket --profile {profile_name} --bucket {bucket_name}
    
  5. Add a target

    ~iworx/bin/s3.pex --add-target --profile {profile_name} --target {target_name} --bucket {bucket_name} --path {/backup/path}
    

To Create a SiteWorx Backup and Transfer to Amazon S3

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. Run the InterWorx backup script, specifying the Amazon S3 target with the --to-s3-target flag and target name

    ~iworx/bin/backup.pex --domain {domain} --to-s3-target {target_name}