This next post is one I am very excited to share with the loginsight community, it should save people a lot of time when they need to perform a restore of blobs archived to NFS when needed required for audit, root cause analysis, GSS cases, review… etc

Any vRLI user which has ever tried to perform restore / import from the NFS archive for a large vRLI setup knows its a very manual and slow process… I personally had multiple issues with loginsight repository import hanging on several 4.7.1 deployments so I had to go back and check what had been imported and what had not and start again. Grrr!!!

I decided I never want to have to go through this manual process again so I set off automating the process that allows less loginsight savvy users to restore logs when I am not around….

In this version I have built 2 methods with 2 more coming soon….

LOCAL which will restore the logs directly off the NFS archive that is configured and imports them into the same instance. The problem with this method is that you will effectively force vRLI to roll existing online logs to NFS faster if the instance is already at capacity… as the import you are performing will obviously consume space. I am not 100% sure but I suspect these re-imported logs will end up getting archived to NFS again wasting further space.

REMOTE which will restore from a primary vRLI to a secondary vRLI instance using SCP via the server/workstation running the powershell script. The script will search for the required blobs, SCP one at a time from the primary vRLI via a local “cache” folder on the server running the script and then SCP it to the secondary vRLI instance cleaning up after itself after each import and logging everything to a logfile. 

coming soon so make sure to check my github repo in case I don’t update this post. 

REMOTENFSMOUNT which will allow you to specify the NFS share where the logs are located as a parameter… this removed the need for the SCP download / upload between the primary and secondary vRLI instance performed by the server/workstation where the script is being executed with the REMOTE option. In this case it will directly mount the NFS archive from the Primary instance without having to actually set anything up in vRLI, restore the desired data and then cleanup / disconnect the NFS share.

LOCALSMBMOUNT which will allow you to pull logs from an 
SMB/CIFS share that the server/ workstation/user running the powerrshell script has access to and push it into the vRLI instance specified via SCP. The purpose of this method would be for a secondary instance typically…. or a primary which no longer has the NFS archive configured any more.

I if you end up using the script you can share your experience with it @ the VMware community forum, on twitter or even improve it on github!

So lets get to the script… follow the instructions below to set it up / use it….

1). Create the following folder structure \ files.

2). So that I don’t keep being prompted for credentials I save the root account and password with the powershell Get-Credential command, you will need to do this for the primary and secondary if the root passwords are not the same.

2b). Optional: If you want to receive an email after the import is finished make sure search for the variables below in the script and update them for you + generate the SMTP.xml credentials file which contains the credentials of a user account that can send mail via SMTP.

3). I have provided some example parameters directly in the script, but you can also run it from powershell like this:


DISCLAIMER: This script mounts/unmounts NFS shares, deletes folders & files on vRLI in some circumstances… use it / mess with it at your own risk. DON’T SAY YOU WERE NOT WARNED!

Hope the script was helpful

vMan