Restoring the S3 configuration data

IBM Storage Scale S3 service support restore of the S3 configuration data by using the mms3 config restore command. The mms3 config restore command extracts the specified tar.bz2 backup file, overwrites the existing content of {cesSharedRoot_dir}/ces/mms3-config.json file, {cesSharedRoot_dir}/ces/s3-config directory, and restarts the S3 service on all the CES nodes.

The mms3 config restore command details are as follows:
#  mms3 config restore -h
Restore the IBM Storage Scale S3 configuration.

Usage:
  mms3 config restore <backup_tar_file> [flags]

Flags:
      --force   Allows the config restore action to go through without confirmation from user.
  -h, --help    help for restore

Global Flags:
  -d, --debug   verbose logging
For more information, see mms3 command

Restoring the S3 configuration from the manual or automatic tar.bz2 backup file

The S3 configuration data can be restored to the CES shared root manually or automatically from the tar.bz2 backup file in two ways:

  • Restore the S3 configuration data by using the tar.bz2 backup file of the S3 configuration, which was automatically backed up in the CCR.
    1. To list the tar.bz2 backup files of S3 configuration in the CCR, issue the following command:
      # mmccr flist  | grep _s3
      A sample output is as follows:
        version  name
      ---------  --------------------
              1  ccr.nodes           
              1  ccr.disks           
              1  mmLockFileDB        
              1  genKeyData          
              2  genKeyDataNew       
             35  mmsdrfs             
              1  mmsysmon.json       
              4  _callhomeconfig     
              2  _perfmon.keys       
              1  measurements.json   
              1  zmrules.json        
              3  collectors          
              6  _gui.settings       
             15  _gui.user.repo      
             14  _gui.keystore_settings
             31  cesiplist           
              3  gpfs.ganesha.main.conf
              1  gpfs.ganesha.nfsd.conf
              1  gpfs.ganesha.log.conf
              2  gpfs.ganesha.exports.conf
              1  gpfs.ganesha.statdargs.conf
              1  idmapd.conf         
            808  _s3-config-backup.tar.bz2
              1  _ces_s3.master_keys 
              1  authccr             
    2. To get a local copy of the backup tar.bz2 file from the CCR, issue the following command:
      #  mmccr fget _s3-config-backup.tar.bz2 /tmp/_s3-config-backup.tar.bz2
      A sample output is as follows:
      fget:808
      To extract the directory, issue the following command:
      # tar -xvf /tmp/_s3-config-backup.tar.bz2 -C /tmp/backup/
      A sample output is as follows:
      ./
      ./config.json
      ./accounts/
      ./accounts/demo-account.json
      ./buckets/
      ./buckets/demo-bucket.json
      ./system.json
      ./access_keys/
      ./access_keys/Pei0Og7tlMD4mFfq5qi5.symlink
      mms3-config.json
      _ces_s3.master_keys
    3. Ensure that the extracted directory contains system.json and config.json files, and the _ces_s3.master_keys key.
      # tree /tmp/backup/
      A sample output is as follows:
             
      ├── access_keys
      ├── accounts
      ├── buckets
      ├── config.json
      ├── mms3-config.json
      ├── _ces_s3.master_keys
      └── system.json
    4. To restore the S3 configuration, issue the following command:
      # mms3 config restore /tmp/_s3-config-backup.tar.bz2
      A sample output is as follows:
      The S3 configuration directory at path /mnt/cesSharedRoot/ces/s3-config is not empty. Restore operation will overwrite the existing S3 configuration and restart the S3 service on all CES nodes. Do you want to proceed ? [y|n]:y
      Started Restoring s3-config configuration data
      
      Restore of IBM Storage Scale S3 configuration successfully done.
      
      S3 Configuration successfully changed. S3 service restarted on the CES node: ces-12.openstacklocal.
      
      S3 Configuration successfully changed. S3 service restarted on the CES node: ces-13.openstacklocal.
      
      S3 Configuration successfully changed. S3 service restarted on the CES node: ces-14.openstacklocal.
  • Restore the S3 configuration by using the tar.bz2 backup file of the S3 configuration, which you backed up manually by using the mms3 config backup command.

    To restore the S3 configuration, issue the following command:

    # mms3 config restore /tmp/s3ConfigBackup.<date>-<time>.tar.bz2
    
     
    
    The S3 configuration directory at path /mnt/cesSharedRoot/ces/s3-config is not empty. Restore operation will overwrite the existing S3 configuration and restart the S3 service on all CES nodes. Do you want to proceed ? [y|n]:y
    
    Started Restoring s3-config configuration data
    
    Restore of IBM Storage Scale S3 configuration successfully done.
    
    S3 Configuration successfully changed. S3 service restarted on the CES node: ces-12.openstacklocal.
    
    S3 Configuration successfully changed. S3 service restarted on the CES node: ces-13.openstacklocal.
    
    S3 Configuration successfully changed. S3 service restarted on the CES node: ces-14.openstacklocal.