LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-14-2005, 08:01 AM   #1
kmitz
LQ Newbie
 
Registered: Jan 2005
Location: CT, USA
Distribution: RH EL3/Fedora 3
Posts: 5

Rep: Reputation: 0
using rsync with cron & pub. key


Hi,

I have a Fedora backup server at home which backs up my production server w/ rsync using a public key.

When I rsync from the command line using the same command as in my_script below, it works just fine (no password required). If I run my_script from the command line, it also works fine.

But when I schedule the same command using cron, the backup server asks for a password which of course it never gets, so the job fails. There is nothing in /var/log/cron that mentions this.

As you can see, the cron job runs as user 'username'. What am I missing here?

contents of crontab for user 'username':
Code:
30 04 * * * username /home/username/my_script
contents of /home/username/my_script:
Code:
rsync -avz -e ssh username@example.com:/home/username/ /home/username/backup_dir/
Thanks,

kmitz
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync & server load bigtl Linux - General 2 11-06-2006 03:09 PM
how do I rsync & cron to fetch -current weekly? chess Slackware 3 09-11-2005 10:07 AM
How do i backup a dns server? I am using rsync but the key dont match abefroman Linux - Networking 2 03-11-2004 08:16 AM
How do i backup a dns server? I am using rsync but the key dont match abefroman Linux - Newbie 1 03-09-2004 07:39 PM
rsync & acl collen Linux - Software 0 12-10-2003 09:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:23 PM.

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