I got this to work:
Quote:
|
* * * * * root cd /var/www/html/backup; wget -c http://192.168.0.10/backup.`date +\%Y-\%m-\%d`.tar.gz
|
Note the back slashes before each %
actually I didn't get the username (root here) part to work, it would always take the username option as being part of the command and would not work. I don't get that since the example in the /etc/crontab file shows there is a username option. So I didn't actually use your command but I tried to approximate it with (again with no username between the last * and "cd" )
36 * * * * cd /home/mos/local; touch foocrontest.`date +\%Y-\%m-\%d`.tar.gz
Of course I don't have a remote server to use wget to get some file with a timestamp in the name so I cheated with using touch. You might still have parsing problems with that http URL that I didn't have
this successfully put a file in /home/mos/local -->
Quote:
ls -l local
-rw-rw-r--. 1 mos mos 0 Jun 3 17:36 foocrontest.2011-06-03.tar.gz
|