Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-10-2007, 03:08 PM   #1
Senior Member
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Auto RSYNC Over SSH via Cron?

Guys - I want to place the following cron job in my server so it can mirror the primary server which users constantly modify on a daily basis but I would like this to be done via CRON at night rather than me having to manually type these commands but when I issue the command as a test, it prompts me for a password which I can understand via SSH access to the machine but what happens if I place this in CRON, will it not run if nobody is there to enter the password? Is there a secure and trusted way to do this?

0 2 * * * rsync --delete -avz -e ssh root@ /etc
1 2 * * * rsync --delete -avz -e ssh root@ /etc
2 2 * * * rsync --delete -avz -e ssh root@ /etc
3 2 * * * rsync --delete -avz -e ssh root@ /
4 2 * * * rsync --delete -avz -e ssh root@ /
Old 09-10-2007, 03:12 PM   #2
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
look up ssh key authentication. there are plenty of tutorials out there on how to do just this.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync server vs rsync over ssh humbletech99 Linux - Networking 1 10-18-2006 01:10 PM
Cannot execute rsync as a cron job jdaniels73 Linux - Software 2 09-03-2006 06:03 AM
how do I rsync & cron to fetch -current weekly? chess Slackware 3 09-11-2005 11:07 AM
auto ssh, and the rsync Swakoo Linux - Networking 5 08-25-2005 07:00 AM
using rsync with cron & pub. key kmitz Fedora 0 01-14-2005 09:01 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:37 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration