Generate Lasso on Windows Server

Rafik Mulla
Rafik Mulla

EDB has developed a small multi-platform application called Lasso that is able to safely gather relevant data on a system where PostgreSQL (and/or other relevant supported software) is running. You can Download Lasso from EnterpriseDB Portal Lasso's homepage for Windows 64-bit (x64).

How does the Configuration file look like?

In the same directory where you downloaded the lasso-windows.exe binary file, create a text file called edb-lasso.cfg with the following contents:

[customer]
id=COMPANY_ID
token=COMPANY_TOKEN

Here we can replace the COMPANY_ID with your company code and COMPANY_TOKEN with your company token. You can see both information on the EDB support Portal, on the left side, under Company info click on Company.

Once the configuration file is created, you can run Lasso specifying the connection to the database in two different ways.

How to execute Lasso From the command line

Lasso is a command line tool, so this needs to be run using the command prompt.

Below are the details steps on how to run Lasso using the command prompt:

Step:1- In the Windows start menu, type cmd;

Step:2- When the Command Prompt tool appears, choose the option `Run as administrator;

Step:3- If Windows asks whether or not you want the Command Prompt to do changes to the system, click Yes;

Step:4- With the Command Prompt open, change the directory to where the Lasso binary is, for example:

cd "C:\Users\Administrator\Documents"

Step:5- Then you can run the lasso-windows.exe binary following this basic format:

lasso-windows.exe -H IP_ADDRESS -p PORT --password PASSWORD DATABASE_NAME USER_NAME

You can replace the parameter as per your details refer to the below parameter details:

  • IP_ADDRESS with the IP address to reach the database. If the database is on the same Windows host, then you can use the local IP address 127.0.0.1;

  • PORT with the port to reach the database. By default, EPAS listens to port 5444 and community PostgreSQL listens to port 5432, if you have mentioned other than the default need to mention that port number.

  • DATABASE_NAME Any database name which is created under your instance. For example, EPAS has by default a database called edb, and Postgres has one called Postgres.

  • USER_NAME and PASSWORD are your credentials to connect to the database. It's recommended to use the ones you used upon the installation, for example, the Enterprisedb user for EPAS or the postgres user for community Postgres.

For example:

lasso-windows.exe -H 127.0.0.1 -p 5444 --password enterprisedb edb enterprisedb

Lasso will generate a .tar.bz2 file in the same directory where you executed its output will look like below:

edb-lasso-report-wcospem-5432-20230615-032316-c3734c9505285eed892638af7d767fa0.tar.bz2 

How to execute Lasso From Windows Explorer?

As explained above, Lasso tries to connect via Unix socket by default, but this is not available on Windows.

If you want instead of passing the database connection as command line arguments as explained above, you can include them in the same configuration file edb-lasso.cfg, for example:

[customer]
id=COMPANY_ID
token=COMPANY_TOKEN
[postgresql]
hostname=127.0.0.1
port=5444
dbname=edb
user=enterprisedb
password=enterprisedb

Then you can right-click the lasso-windows.exe binary file and choose Run as administrator. If a popup shows up, click on Yes.

This way, Lasso will read everything it needs from the configuration file, and generate the Lasso output and the .tar.bz2 file will be generated.

Was this article helpful?

0 out of 0 found this helpful