-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Currently, the default command ran by the cron is root backup perform --trigger my_backup --config-file /etc/backup/config.rb --log-path=/var/log > /dev/nu$
Thing is, this fail miserably because the PATH in a cron is not the same as the PATH in our shell, and the backup command is not found.
I see two solutions here:
- Use the full backup path, i.e
/usr/local/bin/backup - Add a default PATH in the crond resource, i.e
:path => '/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin'
My current solution is to set the path in the cron_options parameters, i.e
cron_options({
:path => '/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin',
:mailto => 'dev@lodgem.com'
})But this is not really straightforward, since without this, the backup-cookbook cron simply does not work :)
Thoughts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels