tohuwabohu / puppet-duplicity

Puppet module to manage backups based on duplicity.
Apache License 2.0
8 stars 33 forks source link

python-boto needed for s3 backend on Ubuntu 16.04.2 #47

Closed jochemd closed 7 years ago

jochemd commented 7 years ago

I was unable to use an s3 backend with your module because I got the error: BackendException: Could not initialize backend: No module named boto

I was using the following hiera configuration:

classes:
  duplicity:
    duply_package_ensure: present
    duply_use_logrotate_module: false
  duplicity::profiles:
    profiles:
      system:
        source: "/"
        target: s3://s3-eu-west-1.amazonaws.com/********/system
        full_if_older_than: 7D
        max_full_backups: 2
        cron_enabled: true
        cron_hour: 4
        cron_minute: 0
        gpg_encryption: false
        include_filelist:
        - "/etc/**"
        duplicity_extra_params:
        - "--s3-use-new-style"
        duply_environment:
        - x

This was on Ubuntu 16.04.2 running in AWS. Installing python-boto solved the issue: apt-get install python-boto

tohuwabohu commented 7 years ago

Hmm .. I don't think the module should be responsible to install packages like that out-of-the-box. Otherwise the list would be too long given the number of protocols supported by duply.

I could imaging having a duply_extra_packages parameter - an empty list by default - which can be used to install required packages before duply is invoked for the first time.

Would you be able to contribute a patch?

jochemd commented 7 years ago

What I wrote is in #49, but for some reason which I don't understand that errors out in the build. It does work though.

tohuwabohu commented 7 years ago

Suggested change is contained in 4.9.0.