Help me figure out this cronjob syntax
by tuxthegreat from LinuxQuestions.org on (#5MCSM)
I want to make a backup of kodi once a week, let's say Tuesday @ 12:10pm here is what I have so far Code:10 12 * * 2 tar -czf kodi-bakup.tar.gz ~/.kodi /home/odroid/kodibackup >/dev/null 2>&1 But it's not doing the cronjob, no output in syslog either just this little output Code:Jul 20 11:45:24 odroid crontab[10775]: (root) REPLACE (root)
Jul 20 11:45:24 odroid crontab[10775]: (root) END EDIT (root)
Jul 20 11:46:01 odroid cron[758]: (root) RELOAD (crontabs/root)
Jul 20 11:46:01 odroid CRON[10847]: (root) CMD (tar -czf kodi-bakup.tar.gz ~/.kodi /home/odroid/kodibackup >/dev/null 2>&1)
Jul 20 11:46:52 odroid crontab[10863]: (root) LIST (root) What am I doing wrong guys ?
Update: It seems that my mistake was using sudo -s and then crontab -e, when I did it without sudo permission it worked. But not completely, I am still unable to save it in /home/odroid/kodibackup , instead it saves it to /home/odroid. Also how can I make it so that when first one is done, the second one will show up as kodi-bakup.tar.gz.1, kodi-bakup.tar.gz.2. and so forth.
Jul 20 11:45:24 odroid crontab[10775]: (root) END EDIT (root)
Jul 20 11:46:01 odroid cron[758]: (root) RELOAD (crontabs/root)
Jul 20 11:46:01 odroid CRON[10847]: (root) CMD (tar -czf kodi-bakup.tar.gz ~/.kodi /home/odroid/kodibackup >/dev/null 2>&1)
Jul 20 11:46:52 odroid crontab[10863]: (root) LIST (root) What am I doing wrong guys ?
Update: It seems that my mistake was using sudo -s and then crontab -e, when I did it without sudo permission it worked. But not completely, I am still unable to save it in /home/odroid/kodibackup , instead it saves it to /home/odroid. Also how can I make it so that when first one is done, the second one will show up as kodi-bakup.tar.gz.1, kodi-bakup.tar.gz.2. and so forth.