Reputation: 133
I'm trying to set a Cron job that will start every day for backup purpose.
I have copied an existing job I saw inside /etc/cron.daily and just edited the file with vim https://www.dropbox.com/s/6edx93pvn7ukiqo/terminal1.png?dl=0
Here is my the backup Cron file I want to execute (just run 2 lines of command, should be root):
sudo /usr/bin/s3cmd put /var/lib/redis/dump.rdb s3://forumupload/
sudo /usr/bin/s3cmd put -r /home/maximur1/nodebb/public/uploads s3://forumupload
Both commands run when I run them on the command line, but in the Cron file, they don't get executed each day like they should. Anything I'm missing? https://www.dropbox.com/s/0txc03p4wgc4xub/cronjob.png?dl=0
Upvotes: 0
Views: 287
Reputation: 1802
For a backup, I would log in as root and use crontab -e
to add backup jobs and crontab -l
to list them. Any user can setup their own cron job using this utility on CentOS or Redhat system. Look at man crontab
for more information.
Upvotes: 1