Skip to main content

Posts

Showing posts from January, 2024

Magento Cloud - How to connect to Opensearch/Elasticsearch

The magento-cloud CLI tool allows developers and system administrators to manage Cloud projects and environments, conduct routines, and run automated activities. The magento-cloud CLI expands on the features and functionality of the Project Web Interface. After installing the magento-cloud CLI on your local machine, you can use it to administer your Adobe Commerce on Cloud Infrastructure Starter and Pro Integration environments. To install the magento-cloud CLI tool on your local, please follow this link. Once you have CLI installed on your local machine, you will have access to all the commands provided by the Magento cloud team for accessing or managing the project from your local machine. After installing CLI, you can use a command magento-cloud tunnel:single to connect to the dependent app of Magento like Redis, OpenSearch & Database. You can execute  magento-cloud tunnel:single  command with multiple variables where you can pass the project code, environment name, etc. Pleas

Magento Cloud - Export Data from Production Database

When working for an organization, there are times when you need to export data from the production database. Ideally, you should build a report or export option in Magento admin for this information. However, these are one-time data for which developing a module or backend functionality is not worthwhile. So, for this circumstance, follow the procedures below to retrieve data from the database. Assuming you already know how to do ssh login to the production server. So let's start with logging into your server. Once you log in follow the below steps: Get Database credentials Once you log in, open your env.php file and get the database credentials stored on the server. You will find an array in the env file and get the credentials from the key with the name "db". Prepare SQL Query Prepare your query whatever you want to export and then save it in a SQL file. You can prepare this file directly on the server or locally. If you want to move this file from local to production t