0

I need to back up a directory with

zip -r /savehere/backup_`date +%y%m%d%H%M%S` /save/this -q

It works fine. But not from crontab:

* * * * zip -r /savehere/backup_`date +%y%m%d%H%M%S` /save/this -q

neither

* * * * cd /savehere/; /usr/bin/zip -r /savehere/backup_`date +%y%m%d%H%M%S` /save/this -q 

Оther commands in this crontab are working.

What is wrong with this command?

Qiao
  • 153
  • 1
  • 7

1 Answers1

1

Always use /path/to/your/command in your crons.

Provide complete path of your binary file in your crons.