Menu

#4975 Webmin variable substitution doesn't work with cron jobs

1.840
open
nobody
5
2017-06-20
2017-06-19
Frank.R
No

The webmin variable substitution doesn't work in automatic cron based backups in the MySQL modul.
If created an per database backup. The backup file looks like "$DB_%Y%m%d_%H%M.sql.gz".
If I start the backup from within webmin the result is like expected - $DB is replaced with the database name. But if the cron jobs start automatically, the result is like $DB_201706190000.sql.gz. $DB is not replaced with the database name.

Discussion

  • Jamie Cameron

    Jamie Cameron - 2017-06-19

    I'm actually surprised that using $DB works anywhere, since there is no support for expanding it in the Webmin code!

     
  • Jamie Cameron

    Jamie Cameron - 2017-06-19

    Do you have webmin_subs=1 set in your /etc/webmin/mysql/config file?

     
  • Frank.R

    Frank.R - 2017-06-20

    OK you are right, it also doesn't work in the webmin gui.
    Yes, webmin_subs=1 is set in config.
    I think I misunderstood webmin_subs.
    It seems to be not possible to use webmin_subs to get the file name for the backup of the current database.

     

    Last edit: Frank.R 2017-06-20
  • Jamie Cameron

    Jamie Cameron - 2017-06-20

    That's correct - webmin_subs is only for including the hostname and a few other variables in the backup path.

     

Log in to post a comment.