cancel
Showing results for 
Search instead for 
Did you mean: 

How to daily backup my database on Magento Cloud

How to daily backup my database on Magento Cloud

Hi everyone!

I want o daily backup my database to a local machine throught a automatic process (isn't necessary all tables).


My goal is to call this backup database from another databases to complement information and ultimately communicate with Power Bi.

 

But as I have Magento cloud, and the comunication is trought a SSH tunnel, I don't know how to do this...

 

Can you help me?

4 REPLIES 4

Re: How to daily backup my database on Magento Cloud

Since you noted you don't necessarily need all tables, can you utilize the scheduled export? - https://experienceleague.adobe.com/docs/commerce-admin/systems/data-transfer/data-scheduled-import-e...

Founder at https://agency418.com

Re: How to daily backup my database on Magento Cloud

Its a great option, however I need to export some tables from a specific extension.. And this option can only export specific things like products...

 

Thank you!

Re: How to daily backup my database on Magento Cloud

 

1. Use the Magento CLI to run scheduled SSH cron jobs for database dumps saved locally.

2. Write a PHP script to connect via SSH tunnel and run mysqldump on a schedule, saving backups locally.

 

Ensure proper security controls are in place. Test restoration process as well.

Re: How to daily backup my database on Magento Cloud

To daily backup your Magento Cloud database, establish a scheduled automatic process using SSH tunneling for communication. Use a command-line tool like mysqldump to selectively back up specific tables or the entire database to your local machine. Configure a cron job to execute the backup command at the desired frequency.

Ensure that SSH tunneling settings are correctly configured for Magento Cloud to facilitate secure communication. Once backups are in place, integrate them with other databases as needed for complementary information. This approach enables you to communicate with Power BI seamlessly, enhancing your data management and reporting capabilities.