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?

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
Qiao
  • 133
  • 6

1 Answers1

1

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

Provide complete path of your binary file in your crons.