TypeError when running duplicity in Cron

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

TypeError when running duplicity in Cron

duplicity-talk mailing list
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.

Thanks
-Dan

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: TypeError when running duplicity in Cron

duplicity-talk mailing list
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

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: TypeError when running duplicity in Cron

duplicity-talk mailing list
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, [hidden email] 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


_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: TypeError when running duplicity in Cron

duplicity-talk mailing list
On 10/7/2018 21:59, Nertskull wrote:
> I use my script to back up some of my servers with no desktop/gui, and
> memory is that duply is only GUI.

nope, that's deja dup. duply is console, actually a bash script. i should know as i started it around 2008 ;) it was known as ftplicity before then.

..ede/duply.net

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk