Help Using Crontab via SSH

Backup and data protection discussion at its finest.
Post Reply
User avatar
maineiac13
Posts: 41
youtube meble na wymiar Warszawa
Joined: Thu Apr 28, 2016 12:38 am

Help Using Crontab via SSH

Post by maineiac13 »

Overall, my goal is to automate a backup of my kodi files to a shared file which in turn will be backed up via Rsync to a second Asustor NAS.

Using SSH as Root I know am able to backup the kodi files with the following commands:

"cd /usr/local/AppCentral"
"cp kodi/ /volume1/Media/Kodi -r"

I want to automate that so that it is done weekly. I tried the following which is intended to have the action take place every Monday at 1:35pm:

"35 13 * * 1 /usr/local/AppCentral/cp kodi/ / volume1/Media/Kodi -r"

but it did not work...As I am not familiar with using Crontab or SSH very much, I would appreciate understanding what I should change.

Thanks, Ken
MikeG.6.5
Posts: 917
Joined: Fri May 15, 2015 1:56 am

Re: Help Using Crontab via SSH

Post by MikeG.6.5 »

You could make a script to do what you want to do.

Look into shell scripting or bash scripting.

Then you call the script in the cron file to do what you want, following that with a call to the rsync in cron (or in your script) to do the actual transfer. In either case, you have to call a script from cron and not pass command line parameters. (It might be possible to pass parameters, but I'm not sure how to do it.)

This gives you a place to start looking, at least... :)
User avatar
maineiac13
Posts: 41
Joined: Thu Apr 28, 2016 12:38 am

Re: Help Using Crontab via SSH

Post by maineiac13 »

Thanks for the reply...I will see what I can do.
Post Reply

Return to “Backup and Data Protection”