############################################################################## How To Backup Array Encryption Keys Using REST API ############################################################################## I tested this procedure on an E590 array ( It should work on other arrays that support the RestAPI) This procedure assumes you have already enabled encryption on your array ( this is easily done via RestAPI ) ------------------------------------------------------------------------------------------- [] On your workstation, Create a directory and make that directory your default ------------------------------------------------------------------------------------------- mkdir /opt/arraykeybk cd /opt/arraykeybk ------------------------------------------------------------------------------------------- [] Create a JSON file with the password that will be used to encrypt the key backup file ------------------------------------------------------------------------------------------- Sample Filename...: InputParams.json IMPORTANT Notes on file contents: - If password is too short or simple, key backup will fail and the error message you recieve will be a generic 400 bad request message ... this will drive you crazy ! - Create the file in the directory you created above ( vi InputParams.json ) Sample Contents {"parameters":{"password": "Silly99$WoofMeow"}} ------------------------------------------------------------------------------------------- [] Build your curl command line ------------------------------------------------------------------------------------------- Note: I did my testing on a Linux system. Windows curl syntax may be slightly different ( I believe Microsoft does have a supported curl implementation available for download however, I have not tested it. ) In the sample below: replace: -u maintenance:$ecret$uirrel with your array's maintenance username and password replace: 192.168.0.9 with your array's IP address curl -v -k -H "Accept:application/octet-stream" -H "Content-Type:application/json" -u maintenance:$ecret$uirrel -X POST --data-binary @./InputParams.json https://192.168.0.9/ConfigurationManager/v1/objects/encryption-keys/file/actions/backup/invoke -o "backupfile.ekf" ------------------------------------------------------------------------------------------- [] Copy - Paste the curl command into your Linux host's CLI ------------------------------------------------------------------------------------------- - The current directory must be the directory where InputParams.json file is stored Key backup is written to this file: backupfile.ekf ------------------------------------------------------------------------------------------- [] Copy the key backup file to a safe and secure location ( multiple locations !! ) ------------------------------------------------------------------------------------------- Note: I have also created a python program to backup encrryption key's ; however, unlike other array management tasks, encryption key backup is a "one-and-done" task, so curl is what I actually use for this task. ( although the python program was a useful / fun exercise )