D
D
DC_CMD2015-12-21 19:25:48
linux
DC_CMD, 2015-12-21 19:25:48

Why is mysqldump in cron not working?

Here is line
10 * * * * root mysqldump -u root -ptipopass serverbase | gzip > `date +/mnt/yandex.disk/bac/base.sql.%Y.%m.%d.%H.%M.gz`
Separately, the command works and writes everything to the Yandex disk, but does not work in cron

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2015-12-21
@Rsa97

When used in cron, it is highly desirable to fully specify the paths to all files, both on the command line and inside running scripts.
If you do not know the full path to mysqldump, run the command
which mysqldump

A
Andrey Burov, 2015-12-21
@BuriK666

make a .sh file and run it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question