Discover Centmin Mod today
Register Now

Beta Branch update centmin.sh menu option 21 submenu option 2 in 130.00beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, May 4, 2023.

  1. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    7:25 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    update centmin.sh menu option 21 submenu option 2 in 130.00beta01

    - update submenu option 2 for AWS CLI S Profile Credentials management for creating new S3 profile, listing all registered S3 profiles and for inspecting S3 profile


    Continue reading...

    130.00beta01 branch

    Support Centmin Mod


    If you find Centmin Mod useful, please help support Centmin Mod
     
  2. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    7:25 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    More follow ups for https://community.centminmod.com/th...ion-21-submenu-routine-in-130-00beta01.23773/

    centmin.sh menu option 21 submenu option 2 for AWS CLI S3 profile management :)

    Example below is for setting up Cloudflare R2 S3 compatible object storage credentials profile in AWS CLI.

    Code (Text):
    --------------------------------------------------------
         Centmin Mod Data Management       
    --------------------------------------------------------
    1).   Manage SSH Keys
    2).   Manage AWS CLI S3 Profile Credentials
    3).   Migrate Centmin Mod Data To New Centmin Mod Server
    4).   Backup Nginx Vhosts Data + MariaBackup MySQL Backups
    5).   Backup Nginx Vhosts Data Only (no MariaDB MySQL backups)
    6).   Backup MariaDB MySQL With MariaBackup Only (no Vhosts Data backups)
    7).   Backup MariaDB MySQL With mysqldump only (no Vhosts Data backups)
    8).   Transfer Directory Data To Remote Server Via SSH
    9).   Transfer Directory Data To S3 Compatible Storage
    10).  Transfer Files To S3 Compatible Storage
    11).  Download S3 Compatible Stored Data To Server
    12).  S3 To S3 Compatible Storage Transfers
    13).  List S3 Storage Buckets
    14).  Back to Main menu
    --------------------------------------------------------
    Enter option [ 1 - 14 ] 2
    --------------------------------------------------------
    

    Code (Text):
    --------------------------------------------------------
         Manage AWS CLI S3 Profile Credentials       
    --------------------------------------------------------
    1).   List Registered AWS CLI S3 Profiles
    2).   List AWS CLI S3 Profile Configuration
    3).   Create New AWS CLI S3 Profile
    4).   Edit Existing AWS CLI S3 Profile
    5).   Delete Existing AWS CLI S3 Profile
    6).   Export Existing AWS CLI S3 Profile
    7).   Backup All Existing AWS CLI S3 Profiles
    8).   Back to Main menu
    --------------------------------------------------------
    Enter option [ 1 - 8 ] 3
    --------------------------------------------------------
    
    Updating AWS CLI command line tool /usr/local/bin/aws
    

    Code (Text):
    Create New AWS CLI S3 Profile
    
    To setup a new AWS CLI S3 Profile, you need to have signed up with a
    S3 storage provider like Amazon AWS S3, Backblaze, Cloudflare R2
    Linode, Vultr or DigitalOcean S3 object storage provider and obtained
    your S3 credentials for Access key ID and Secret Key and your endpoint
    url where applicable i.e. Cloudflare R2, Linode, DigitalOcean, Backblaze
    all have a their own specific endpoint url to use with their S3 storage.
    
    The following questions and your input will be used to setup a new AWS
    CLI S3 profile.
    
    Do you want to continue [y/n]: y
    Your S3 Storage Provider i.e. aws, cloudflare, digitalocean, backblaze etc : cloudflare
    Desired AWS CLI S3 Profile Name: r2
    Endpoint url: i.e. for Cloudflare YOUR_CF_ACCOUNT_ID.r2.cloudflarestorage.com: https://YOUR_CF_ACCOUNT_ID.r2.cloudflarestorage.com
    Enter AWS_ACCESS_KEY_ID: MY_ACCESS_KEY
    Enter AWS_SECRET_ACCESS_KEY: MY_SECRET_ACCESS_KEY
    Enter AWS_DEFAULT_REGION for Cloudflare use r2: r2
    Enter AWS_DEFAULT_OUTPUT: text
    
    You entered S3 Storage Provide=cloudflare
    You entered AWS CLI S3 Profile Name=r2
    Your entered endpoint url=https://YOUR_CF_ACCOUNT_ID.r2.cloudflarestorage.com
    You enter AWS_ACCESS_KEY_ID=MY_ACCESS_KEY
    You enter AWS_SECRET_ACCESS_KEY=MY_SECRET_ACCESS_KEY
    You enter AWS_DEFAULT_REGION=r2
    You enter AWS_DEFAULT_OUTPUT=text
    
    Are these details correct? [y/n/exit]: y
    
    configure aws-cli profile: r2
    configure aws cli for Cloudflare R2
    aws configure set s3.max_concurrent_requests 2 --profile r2
    aws configure set s3.multipart_threshold 50MB --profile r2
    aws configure set s3.multipart_chunksize 50MB --profile r2
    aws configure set s3.addressing_style path --profile r2
    aws configure set region auto --profile r2
    
    aws-cli profile: r2 set:
    
    aws_access_key_id: MY_ACCESS_KEY
    aws_secret_access_key: MY_SECRET_ACCESS_KEY
    default.region: r2
    default output format: text
    
    list aws-cli profiles:
    
    default
    r2
    

    Listing all registered AWS CLI S3 profiles which are default and r2.
    Code (Text):
    --------------------------------------------------------
         Manage AWS CLI S3 Profile Credentials       
    --------------------------------------------------------
    1).   List Registered AWS CLI S3 Profiles
    2).   List AWS CLI S3 Profile Configuration
    3).   Create New AWS CLI S3 Profile
    4).   Edit Existing AWS CLI S3 Profile
    5).   Delete Existing AWS CLI S3 Profile
    6).   Export Existing AWS CLI S3 Profile
    7).   Backup All Existing AWS CLI S3 Profiles
    8).   Back to Main menu
    --------------------------------------------------------
    Enter option [ 1 - 8 ] 1
    --------------------------------------------------------
    
    Updating AWS CLI command line tool /usr/local/bin/aws
    
    List Registered AWS CLI S3 Profiles
    
    default
    r2
    

    Inspecting AWS S3 profile = r2 that was just setup
    Code (Text):
    --------------------------------------------------------
         Manage AWS CLI S3 Profile Credentials       
    --------------------------------------------------------
    1).   List Registered AWS CLI S3 Profiles
    2).   List AWS CLI S3 Profile Configuration
    3).   Create New AWS CLI S3 Profile
    4).   Edit Existing AWS CLI S3 Profile
    5).   Delete Existing AWS CLI S3 Profile
    6).   Export Existing AWS CLI S3 Profile
    7).   Backup All Existing AWS CLI S3 Profiles
    8).   Back to Main menu
    --------------------------------------------------------
    Enter option [ 1 - 8 ] 2
    --------------------------------------------------------
    
    Updating AWS CLI command line tool /usr/local/bin/aws
    
    List AWS CLI S3 Profile Configuration
    
    Do you want to continue [y/n]: y
    Enter AWS CLI S3 Profile Name For Configuration Overview: r2
    
    You entered AWS CLI S3 Profile Name = r2
    
    Are these details correct? [y/n/exit]: y
          Name                    Value             Type    Location
          ----                    -----             ----    --------
       profile                       r2           manual    --profile
    access_key     ****************e916 shared-credentials-file   
    secret_key     ****************9d2b shared-credentials-file   
        region                     auto      config-file    ~/.aws/config