06-07-2009, 01:55 PM
Hello,
Dreamhost (my web hosting provider) provides 50 GB of space for backups of any data I choose. I have successfully created an rsync (a unix program for doing backups) script that backups my iPhoto files (all 32 GB of them!). The script works fine when I run it from the terminal, but when I created a cron job (cron is another unix utility for automating different tasks--such as the running of a backup script) to run the rsync job, it fails.
The cronjob *does* try to run the rsync script, but I get an error that seems to indicate there is an authorization issue.
I had to do some stuff with setting up a public key for the sftp part of the backup, and as I said, it works fine when I invoke the rsync script in Terminal, but it's not working when invoked by cron. I'm thinking this may have to do with the cron job being executed as some other user, thus making the public key invalid.
Anyone have any thoughts on this? What to check to try fixing it?
I tried creating a cron job for the root user, and telling it to execute the rsync script as me, but that didn't work, either. Same error.
Dreamhost (my web hosting provider) provides 50 GB of space for backups of any data I choose. I have successfully created an rsync (a unix program for doing backups) script that backups my iPhoto files (all 32 GB of them!). The script works fine when I run it from the terminal, but when I created a cron job (cron is another unix utility for automating different tasks--such as the running of a backup script) to run the rsync job, it fails.
The cronjob *does* try to run the rsync script, but I get an error that seems to indicate there is an authorization issue.
I had to do some stuff with setting up a public key for the sftp part of the backup, and as I said, it works fine when I invoke the rsync script in Terminal, but it's not working when invoked by cron. I'm thinking this may have to do with the cron job being executed as some other user, thus making the public key invalid.
Anyone have any thoughts on this? What to check to try fixing it?
I tried creating a cron job for the root user, and telling it to execute the rsync script as me, but that didn't work, either. Same error.