[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] Backup fails only from cron
From: |
Kenneth Loafman |
Subject: |
Re: [Duplicity-talk] Backup fails only from cron |
Date: |
Fri, 30 Jul 2010 06:23:34 -0500 |
User-agent: |
Thunderbird 2.0.0.24 (X11/20100411) |
Hi,
cron runs as root, so I'm guessing that your SSH key is under your user,
not root.
The way I handle it is to use a ~/.ssh/config file with contents like:
# cat .ssh/config
IdentityFile /home/ken/.ssh/id_rsa
IdentityFile /home/ken/.ssh/id_dsa
...Ken
address@hidden wrote:
> How are you telling ssh the password for your key (when run by cron)?
>
> ..ede/duply.net
>
>
> On 30.07.2010 13:08, Adam Huffman wrote:
>> I'm trying to setup automated backups via cron on a Fedora 13 system,
>> connecting to a Centos 5.5 server.
>>
>> When I run the simple script interactively, it works fine, using an
>> SSH key to connect to the server.
>>
>> When I schedule the script via cron it fails with the "Invalid SSH
>> password" error.
>>
>> Here's the traceback:
>>
>>
>> Backend error detail: Traceback (most recent call last):
>> File "/usr/bin/duplicity", line 1239, in<module>
>> with_tempdir(main)
>> File "/usr/bin/duplicity", line 1232, in with_tempdir
>> fn()
>> File "/usr/bin/duplicity", line 1133, in main
>> sync_archive()
>> File "/usr/bin/duplicity", line 910, in sync_archive
>> remlist = globals.backend.list()
>> File
>> "/usr/lib64/python2.6/site-packages/duplicity/backends/sshbackend.py",
>> line 270, in list
>> l = self.run_sftp_command(commandline, commands).split('\n')[1:]
>> File
>> "/usr/lib64/python2.6/site-packages/duplicity/backends/sshbackend.py",
>> line 197, in run_sftp_command
>> raise BackendException("Error running '%s'" % commandline)
>>
>> I've seen similar errors reported and there's
>> https://bugs.launchpad.net/duplicity/+bug/411145, though there's no
>> sign of a "Couldn't get handle" error in my case.
>>
>> The problem occurs both with the current Fedora package 0.6.08b and
>> with a local build of the latest version 0.6.09.
>>
>> Here's the redacted script:
>>
>>
>> #!/bin/sh
>> # Script to backup $HOME
>>
>> export PASSPHRASE="<passphrase>"
>>
>> duplicity -v 9 --ssh-options="-oIdentityFile=/home/linda/.ssh/id_dsa"
>> /home/linda scp://linda@<remote server>//home2/linda
>>
>>
>> Adam
>>
>> _______________________________________________
>> Duplicity-talk mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/duplicity-talk
>
> _______________________________________________
> Duplicity-talk mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/duplicity-talk
>
signature.asc
Description: OpenPGP digital signature