[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] TypeError when running duplicity in Cron
From: |
Nertskull |
Subject: |
Re: [Duplicity-talk] TypeError when running duplicity in Cron |
Date: |
Sun, 7 Oct 2018 15:59:05 -0400 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Allright, I sincerely apologize for jumping the gun, but apparently it
was a version problem like that other post suggested. Someone else had
manually installed duplicity 0.7.17 and I didn't know that.
The default that ships with Ubuntu 16.04 is duplicity 0.7.06. I found
and uninstalled 0.7.17 and tried again from crontab, and it is running
right now. So I think that must have been the issue.
Sorry to waste everyone's time.
I should look into duply. I started using duplicity in ~2008 and I
don't remember duply being available at the time (maybe it was?). Plus
I use my script to back up some of my servers with no desktop/gui, and
memory is that duply is only GUI.
On 10/7/2018 3:22 PM, address@hidden wrote:
> On 10/7/2018 21:03, Nertskull via Duplicity-talk wrote:
>> I'm not sure this is a duplicity or cron or python issue.
>>
>> But when I run duplicity on the command line, I get no errors.
>>
>> But when I run as part of a cronjob, I get this error
>>
>> File "/usr/bin/duplicity", line 1532, in <module>
>> with_tempdir(main)
>> File "/usr/bin/duplicity", line 1526, in with_tempdir
>> fn()
>> File "/usr/bin/duplicity", line 1380, in main
>> do_backup(action)
>> File "/usr/bin/duplicity", line 1405, in do_backup
>> globals.archive_dir).set_values()
>> TypeError: __init__() takes exactly 4 arguments (3 given)
>>
>> I run the cronjob using
>>
>> 01 01 * * * /usr/bin/python2.7 /path/to_my/duplicity-script
>>
>> The script just sets things like which folder and volume size etc. And
>> then uses subprocess.call to run duplicity with the correct settings
>> from the variables in the script.
>>
>> I'm on Ubuntu 16.04.4 and this is a brand new install. I was running
>> this same script on 12.04 and it was working with no issues.
>>
>> I'm running duplicity version 0.7.17. I installed it using apt-get.
>>
>> I searched around and found one thread here:
>>
>> https://askubuntu.com/questions/1000561/deja-dup-init-takes-exactly-4-arguments-3-given?rq=1
>>
>> But that just seems to suggest that that person updated python modules
>> weirdly, and installed duplicity through pip. I have done nothing like
>> that. I don't even have pip installed. Everything is a fresh install
>> on 16.04.4.
>>
>> Like I said, it all works when running manually on the command line. So
>> I'm not sure its just cron is doing something strange. But I thought
>> asking her first would get me pointed in the right direction.
>>
> hey Dan,
>
> how about providing mentioned /duplicity-script/? any specific reason not to
> use duply?
>
> ..ede/duply.net