Laravel-backup: Issues running backup when database is in a different docker container

Created on 16 May 2017  路  3Comments  路  Source: spatie/laravel-backup

We've been a long-time user of laravel-backup and recently enjoyed upgrading to a new machine with php7. Along with the upgrade, we also changed to a docker-based setup. That way our application is separate from the database and only talks through the internal network.

The issue laravel-backup has, that it requires the mysqldump command in the laravel-machine. The command is available, but only in our DB-container. Is there a workaround for this? Do I have to install the mysqldump command in our laravel container as well, so it can "remotely" dump the contents?

Cheers and thanks for the great work so far!

Most helpful comment

Alright, sorry for the late response. Didn't have the time to work on this until today.
I eventually just added the following line to our custom Dockerfile we use for laravel:

RUN apt-get install -y mariadb-client

Recreate the instance, run your backup and everything works as expected.

Even though we use mariadb 10.1 and the installed client seems to be version 5.6, there are no conflicts or version mismatches.

All 3 comments

Hi,

thanks for the kind words on our work. Unfortunately I'm not using Docker myself yet, so I can't help you with this problem.

I'd appreciate however that if you find a solution, you post it here.

Alright, sorry for the late response. Didn't have the time to work on this until today.
I eventually just added the following line to our custom Dockerfile we use for laravel:

RUN apt-get install -y mariadb-client

Recreate the instance, run your backup and everything works as expected.

Even though we use mariadb 10.1 and the installed client seems to be version 5.6, there are no conflicts or version mismatches.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shez1983 picture shez1983  路  3Comments

holymp2006 picture holymp2006  路  4Comments

stefro picture stefro  路  7Comments

itzikbenh picture itzikbenh  路  3Comments

ClickerVinod picture ClickerVinod  路  3Comments