Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mark_kcc's avatar

Laravel 8 dump mysql db

I have tried to add the spatie/laravel-backup package but it is not working for Laravel 8. The app is in shared hosting so I am not able to run exec() or passthru(). Are there any alternatives?

Thanks

0 likes
12 replies
jlrdw's avatar

Do the dump in phpmyadmin. But what hosting isn't allowing cli interface?

2 likes
mark_kcc's avatar

Not sure how this helps with Laravel 8?

Snapey's avatar

the fact that it's Laravel 8 should be irrelevant

1 like
mark_kcc's avatar

I did mention that I tried to add the package to 8 and it will not install, so unless I'm missing something?

Snapey's avatar

you said nothing about it not installing

mark_kcc's avatar

"I have tried to add the spatie/laravel-backup package but it is not working for Laravel 8" Sorry thought it was implied.

Snapey's avatar

it's not normal to install packages directly into production sites?

I would expect you to install it locally and then deploy to the server however you usually do

mark_kcc's avatar

As I mentioned the app is in shared hosting, so I did exactly that, tried to install locally and it did not work. Do you have any helpful solutions?

Snapey's avatar

so it did not install locally?

at this point the problem is not the shared hosting

what error did you get?

mark_kcc's avatar

The solution I am looking to solve is to be able to export and email the mysql DB for my app that is hosted in shared hosting.

I attempted to add the spatie/laravel-backup package in my local env for this app but it does not work with Laravel 8 and this is according to their documentation.

I created a command that executes the mysqldump command using exec() and passthru() wihich works locally but is blocked in shared hosting. The hosting company will not allow them.

Let me know if you need any more information.

Please or to participate in this conversation.