Giter VIP home page Giter VIP logo

docker-duplicity's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-duplicity's Issues

Feature Request - Expose Email Credentials

I imagine that the email function was only intended for a localhost mail server, but I would love to use this with a remote server (which obviously requires authentication). Just need the smtp user and password variables exposed as env vars...

Question / Its possible to restore this files outside copier container on different device?

Im starting to get a lighut out how this works.

I did succesfully make an S3 backup from my copier instance so now i have multiple files created on S3 bucket from my copier project.

Now I see the commands to do a restore on the copier instance but:

¿What if i need to restore my files outside this container?

Sample: filestore and postgresql restore as dump and file tar to make inspetions on my lap?

¿Is there a way?

Regards

Restore error

Hi,
I'm trying to perform a restore but I find this error. How I can solve this?
I'm save the backups in S3. It was working fine before.

image

Thanks

Image size cargo

With the latest update, cargo was added as a build deps.

RUN apk add --no-cache --virtual .build \
build-base \
krb5-dev \
libffi-dev \
librsync-dev \
libxml2-dev \
libxslt-dev \
openssl-dev \
cargo \
# Runtime dependencies, based on https://gitlab.com/duplicity/duplicity/-/blob/master/requirements.txt
&& pip install --no-cache-dir -r requirements.txt \
&& apk del .build

Could you also run && rm -rf /root/.cargo/ so that the image size isn't twice as big as it was before ? (+235.4MiB with the last update)

No restore option when container is lost

A best practice of docker containers is to be ephemeral, meaning the container can be lost and recreated from image without lost functionality. I use the tecnativa/duplicity image to have long-running containers and I have set a PASSPHRASE docker env variable to supply duplicity with the GPG passphrase.

However, I found out that recreating the container (with identical passphrase), this new container is not able to read backup data. Duplicity breaks with "no signature chains found". This means that you can restore data from backup when your (host) system is still intact. If your host crashed and you lost the container, you have no option to restore the data from backup, kinda the reason you run the backups...

I am just submitting this issue as I found out and can confirm the behavior, I have no root cause or fix yet. I tried "fixing" the container by importing files from /root/.gnupg, random_seed and pubring.kbx to be specific. Binary files are transferred via base64 and validated via md5, so their content is equal to be sure. However, the problem still persist.

$ docker exec duplicity dup list-current-files file:///mnt/backup/dst/
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
Traceback (innermost last):
  File "/usr/local/bin/duplicity", line 117, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 103, in with_tempdir
    fn()
  File "/usr/local/lib/python3.9/site-packages/duplicity/dup_main.py", line 1535, in main
    do_backup(action)
  File "/usr/local/lib/python3.9/site-packages/duplicity/dup_main.py", line 1617, in do_backup
    list_current(col_stats)
  File "/usr/local/lib/python3.9/site-packages/duplicity/dup_main.py", line 691, in list_current
    sig_chain = col_stats.get_signature_chain_at_time(time)
  File "/usr/local/lib/python3.9/site-packages/duplicity/dup_collections.py", line 1026, in get_signature_chain_at_time
    raise CollectionsError(u"No signature chains found")
 duplicity.dup_collections.CollectionsError: No signature chains found

In my case, /mnt/backup/dst is a webdav mounted folder (duplicity can't handle my webdav source somehow so I use fuse). The container does mount the source correctly, I can browse /mnt/backup/dst.

$ docker exec duplicity ls /mnt/backup/dst/ | wc -l
128

Also, the container name and hostname matches with the original container, so no hostname mismatch errors occurred.

$ docker exec duplicity hostname
duplicity

So, is there any other file persistency required?

Duplicity restore gets stuck

I tried everything I could think of but for some reason when doing restore on the dev environment at any place it gets stuck at this point:

No orphaned or incomplete backup sets found.
Processing local manifest /root/.cache/duplicity/6e26b4812ae28d6c32e1a501a720c432/duplicity-full.20171213T175726Z.manifest (160189)
Found manifest volume 1
Found 1 volumes in manifest
Registering (mktemp) temporary file /tmp/duplicity-VshO67-tempdir/mktemp-_TnLHU-6

The point to easily get the test database on development to test certain things out. For this reason I've attached the backup service to the dev.yaml and try to restore the db.

Not sure if it ever happened to you but I just can't seem to uncover what's wrong.

[Rsync Backend] Not working without the installation of rsync 'apk rsync install'

Without 'apk add rsync' command :

Manual duplicity command :

# /usr/local/bin/duplicity --no-encryption --full-if-older-than 1M --name first-test -v debug .dockerenv rsync://[email protected]:7655//home/user/game 
                            
Using archive dir: /root/.cache/duplicity/first-test                                                                                                                                                               
Using backup name: first-test                                                                                                                                                                                      
GPG binary is gpg, version (2, 2, 23)                                                                                                                                                                              
Import of duplicity.backends.adbackend Succeeded                                                                                                                                                                   
Import of duplicity.backends.azurebackend Succeeded
Import of duplicity.backends.b2backend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.dpbxbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.giobackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.hubicbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.jottacloudbackend Succeeded
Import of duplicity.backends.lftpbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.mediafirebackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.megav2backend Succeeded
Import of duplicity.backends.multibackend Succeeded
Import of duplicity.backends.ncftpbackend Succeeded
Import of duplicity.backends.onedrivebackend Succeeded
Import of duplicity.backends.par2backend Succeeded
Import of duplicity.backends.pcabackend Succeeded
Import of duplicity.backends.pydrivebackend Succeeded
Import of duplicity.backends.rclonebackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.s3_boto3_backend Succeeded
Import of duplicity.backends.s3_boto_backend Succeeded
Import of duplicity.backends.ssh_paramiko_backend Succeeded
Import of duplicity.backends.ssh_pexpect_backend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.sxbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Main action: inc
Acquiring lockfile b'/root/.cache/duplicity/first-test/lockfile'
================================================================================
duplicity $version
Args: /usr/local/bin/duplicity --no-encryption --full-if-older-than 1M --no-encryption --name first-test -v debug .dockerenv rsync://[email protected]:7655//home/user/game
Linux 41699f8c6be3 4.4.59+ #25426 SMP PREEMPT Wed Jul 8 03:21:29 CST 2020 x86_64 
/usr/local/bin/python3 3.9.0 (default, Nov 25 2020, 02:36:55) 
[GCC 9.3.0]
================================================================================
Using temporary directory /tmp/duplicity-1bes3b_b-tempdir
Registering (mkstemp) temporary file /tmp/duplicity-1bes3b_b-tempdir/mkstemp-54a92nma-1
Temp has 2361260797952 available, backup will use approx 272629760.
Reading results of 'rsync -e 'ssh -p 7655 -oBatchMode=yes '  [email protected]:/home/user/game/'
Backtrace of previous error: Traceback (innermost last):
  File "/usr/local/lib/python3.9/site-packages/duplicity/backend.py", line 384, in inner_retry
    return fn(self, *args)
  File "/usr/local/lib/python3.9/site-packages/duplicity/backend.py", line 604, in list
    return [tobytes(x) for x in self.backend._list()]
  File "/usr/local/lib/python3.9/site-packages/duplicity/backends/rsyncbackend.py", line 131, in _list
    result, stdout, stderr = self.subprocess_popen(commandline)
  File "/usr/local/lib/python3.9/site-packages/duplicity/backend.py", line 516, in subprocess_popen
    result, stdout, stderr = self.__subprocess_popen(args)
  File "/usr/local/lib/python3.9/site-packages/duplicity/backend.py", line 488, in __subprocess_popen
    p = Popen(args, stdout=PIPE, stderr=PIPE, universal_newlines=True)
  File "/usr/local/lib/python3.9/subprocess.py", line 947, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.9/subprocess.py", line 1742, in _execute_child
    executable = os.fsencode(executable)
  File "/usr/local/lib/python3.9/os.py", line 810, in fsencode
    filename = fspath(filename)  # Does type-checking of `filename`.
 TypeError: expected str, bytes or os.PathLike object, not NoneType

Attempt 1 failed. TypeError: expected str, bytes or os.PathLike object, not NoneType

^CReleasing lockfile b'/root/.cache/duplicity/first-test/lockfile'
Removing still remembered temporary file /tmp/duplicity-1bes3b_b-tempdir/mkstemp-54a92nma-1
INT intercepted...exiting.
Releasing lockfile b'/root/.cache/duplicity/first-test/lockfile'
Releasing lockfile b'/root/.cache/duplicity/first-test/lockfile'

duplicity running by the script /etc/periodic/daily/jobrunner (without apk add rsync):

/ # python /etc/periodic/daily/jobrunner                                                                                                                                                                           
INFO:jobrunner:2020-12-06 11:02:38.440722 UTC - Running daily jobs                                                                                                                                                 
INFO:jobrunner:Running job 300: `backup`                                                                                                                                                                           
ERROR:jobrunner:Failed!                                                                                                                                                                                            
Traceback (most recent call last):                                                                                                                                                                                 
  File "/etc/periodic/daily/jobrunner", line 59, in <module>                                                                                                                                                       
    result = check_output(expanded_command, stderr=STDOUT, shell=True, text=True)                                                                                                                                  
  File "/usr/local/lib/python3.9/subprocess.py", line 420, in check_output                                                                                                                                         
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,                                                                                                                                               
  File "/usr/local/lib/python3.9/subprocess.py", line 524, in run                                                                                                                                                  
    raise CalledProcessError(retcode, process.args,                                                                                                                                                                
subprocess.CalledProcessError: Command 'backup' returned non-zero exit status 50.                                                                                                                                  
ERROR:jobrunner:                                                                                                                                                                                                   
===================================                                                                                                                                                                                
Job 300: `backup`                                                                                                                                                                                                  
Started: 2020-12-06 12:02:38.442483                                                                                                                                                                                
Finished: 2020-12-06 12:04:39.131600                                                                                                                                                                               
Success: False                                                                                                                                                                                                     
                                                                                                                                                                                                                   
Command 'backup' returned non-zero exit status 50.                                                                                                                                                                 
+ exec dup /mnt/backup/src rsync://[email protected]:7655//home/user                                                                                                                                        
Attempt 1 failed. TypeError: expected str, bytes or os.PathLike object, not NoneType                                                                                                                               
Attempt 2 failed. TypeError: expected str, bytes or os.PathLike object, not NoneType                                                                                                                               
Attempt 3 failed. TypeError: expected str, bytes or os.PathLike object, not NoneType                                                                                                                               
Attempt 4 failed. TypeError: expected str, bytes or os.PathLike object, not NoneType                                                                                                                               
Giving up after 5 attempts. TypeError: expected str, bytes or os.PathLike object, not NoneType                                                                                                                     
                                                                                                                                                                                                                   
INFO:jobrunner:Sending email report                                                                                                                                                                                
At least one job failed                     

With apk add rsync :

/ # apk add rsync
(1/2) Installing libacl (2.2.53-r0)
(2/2) Installing rsync (3.1.3-r3)
Executing busybox-1.31.1-r19.trigger
OK: 48 MiB in 80 packages


/ # /usr/local/bin/duplicity --no-encryption --full-if-older-than 1M --name first-test  .dockerenv rsync://[email protected]:7655//home/user/
Warning, found signatures but no corresponding backup files
Synchronizing remote metadata to local cache...
Deleting local /root/.cache/duplicity/first-test/duplicity-full-signatures.20201206T114033Z.sigtar.gz (not authoritative at backend).
Deleting local /root/.cache/duplicity/first-test/duplicity-full.20201206T114033Z.manifest (not authoritative at backend).
Last full backup date: none
Last full backup is too old, forcing full backup
--------------[ Backup Statistics ]--------------
StartTime 1607255633.60 (Sun Dec  6 12:53:53 2020)
EndTime 1607255633.60 (Sun Dec  6 12:53:53 2020)
ElapsedTime 0.00 (0.00 seconds)
SourceFiles 1
SourceFileSize 0 (0 bytes)
NewFiles 1
NewFileSize 0 (0 bytes)
DeletedFiles 0
ChangedFiles 0
ChangedFileSize 0 (0 bytes)
ChangedDeltaSize 0 (0 bytes)
DeltaEntries 1
RawDeltaSize 0 (0 bytes)
TotalDestinationSizeChange 86 (86 bytes)
Errors 0
-------------------------------------------------

duplicity running by the script /etc/periodic/daily/jobrunner (with apk add rsync):

/ # python3.9 /etc/periodic/daily/jobrunner                                                                                                                                                                        
INFO:jobrunner:2020-12-06 10:26:15.802475 UTC - Running daily jobs                                                                                                                                                 
INFO:jobrunner:Running job 300: `backup`                                                                                                                                                                           
INFO:jobrunner:                                                                                                                                                                                                    
===================================                                                                                                                                                                                
Job 300: `backup`                                                                                                                                                                                                  
Started: 2020-12-06 11:26:15.803959                                                                                                                                                                                
Finished: 2020-12-06 11:26:19.978141                                                                                                                                                                               
Success: True                                                                                                                                                                                                      
                                                                                                                                                                                                                   
+ exec dup /mnt/backup/src/ rsync://[email protected]:7655//home/user/                                                                                                                                  
Warning, found signatures but no corresponding backup files                                                                                                                                                        
Synchronizing remote metadata to local cache...                                                                                                                                                                    
Deleting local /root/.cache/duplicity/fe09f4eccdd125068f8ddfa25e2de81f/duplicity-full-signatures.20201206T093154Z.sigtar.gz (not authoritative at backend).                                                        
Deleting local /root/.cache/duplicity/fe09f4eccdd125068f8ddfa25e2de81f/duplicity-full.20201206T093154Z.manifest (not authoritative at backend).                                                                    
Last full backup date: none                                                                                                                                                                                        
Reuse configured PASSPHRASE as SIGN_PASSPHRASE                                                                                                                                                                     
No signatures found, switching to full backup.                                                                                                                                                                     
--------------[ Backup Statistics ]--------------                                                                                                                                                                  
StartTime 1607250377.41 (Sun Dec  6 11:26:17 2020)                                                                                                                                                                 
EndTime 1607250377.54 (Sun Dec  6 11:26:17 2020)                                                                                                                                                                   
ElapsedTime 0.14 (0.14 seconds)                                                                                                                                                                                    
SourceFiles 82                                                                                                                                                                                                     
SourceFileSize 895490 (875 KB)                                                                                                                                                                                     
NewFiles 82                                                                                                                                                                                                        
NewFileSize 895490 (875 KB)                                                                                                                                                                                        
DeletedFiles 0                                                                                                                                                                                                     
ChangedFiles 0                                                                                                                                                                                                     
ChangedFileSize 0 (0 bytes)                                                                                                                                                                                        
ChangedDeltaSize 0 (0 bytes)                                                                                                                                                                                       
DeltaEntries 82                                                                                                                                                                                                    
RawDeltaSize 893716 (873 KB)
TotalDestinationSizeChange 645221 (630 KB)
Errors 0                                            
-------------------------------------------------


INFO:jobrunner:Sending email report

Additional information :

/ # rsync --version
rsync  version 3.1.3  protocol version 31
Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes, prealloc

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

/ # duplicity -V
duplicity $version

---
version: "2.1"
services:
  backup:
    image: tecnativa/duplicity:latest

Duplicate process handling for very long backup

Hello, I have finally tested and set up my backup solution, and I am preparing to run the first backup. However, with my pitifully slow upload speed (15mbps with Xfinity), the first upload will take around a full week.

I am fine with this, but I want to know if Duplicity will handle this correctly. Of course there will be multiple daily backups which attempt to run while the backup is going, but will Duplicity know not to run these?

Dropbox version incompatibility

I'm trying to use this with dropbox. I believe the dropbox-sdk-python version (8.3.1) specified in requirments.txt is either incompatible with python > 3.7 or dropbox itself. I get python syntax errors when I try to access dropbox with the image.
I think this issue was fixed in version 9 of the dropbox-sdk if I'm reading https://github.com/dropbox/dropbox-sdk-python/issues/145 correctly.
I was able to work around this by forcing a dropbox version update. This may have broken some dependencies with other packages I don't use. I don't know much about handling dependencies in python. Would it be possible to update the dropbox version in this image?

Update to latest duplicity version

The version used in the Dockerfile is pretty old - any plans on updating this?

I tried to set the DUPLICITY_VERSION var to 0.8.12. However, the image did not build.

Step 11/31 : RUN apk add --no-cache         ca-certificates         dbus         gnupg         krb5-libs         lftp         libffi         librsync         ncftp         openssh         openssl         py2-gobject3         tzdata     && sync
 ---> Running in 0c60e4fd6984
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  py2-gobject3 (missing):
    required by: world[py2-gobject3]
ERROR: Service 'backup-docker-host' failed to build: The command '/bin/sh -c apk add --no-cache         ca-certificates         dbus         gnupg         krb5-libs         lftp         libffi         librsync         ncftp         openssh         openssl         py2-gobject3         tzdata     && sync' returned a non-zero code: 1

Maybe there are some problems with python packages?

gpg options not settable

https://bugs.launchpad.net/duplicity/+bug/503309
Regarding to this link i want to set bzip2 and its compression level, to get parallel compression to speed things up significantly.

Nevertheless, the current configuration system does not enable such functionality. When i set the following environment variable inside my docker-compose setup:

  OPTIONS: --allow-source-mismatch --gpg-options "--compress-algo=bzip2 --bzip2-compress-level=9"

The single options are still splitted up and the group of the gpg-options are not treated correctly. This results in this call:

Executing: ['duplicity', '--allow-source-mismatch', '--gpg-options', '"--compress-algo=bzip2', '--compress-level=9"', '--metadata-sync-mode', 'partial', '/mnt/backup/src', 'file:///mnt/backup-dest/']

Where duplicity answers:

duplicity: error: no such option: --compress-level

How should i escape the stuff in the OPTION environment to keeo the gpg-options correctly grouped?

Quotes removed from command line options

I added the environment variable

OPTIONS: "--ssh-options '-P 8080 -l 8000'"

but apparently quotes are removed

Executing: ['duplicity', '--ssh-options', '-P', '8080', '-l', '8000', '--metadata-sync-mode', 'partial', '/data', 'sftp://myuser@myhost//mnt/disk/duplicity2']

so the command fails to run.

Outside of docker, I use this command (working):

duplicity /some/dir --ssh-options '-P 8080 -l 8000' pexpect+sftp://myuser@myhost//mnt/disk/duplicity/

Feature request: Servicing multiple postgres instances

For files, I like that I can use this image and have different services just volume mount to the source directory. Example:

# someservice.yaml
services:
  someservice:
    volumes:
     ../data/someservice/config:/config
   
  # i can just add these lines here to have them backed up  
  backup:
    volumes:
      - ../data/someservice/config:/mnt/backup/src/someservice/config:ro

This means I only need one docker-duplicity image, and people can choose what services they want to be backed up with just a few lines.

I am trying to have the same setup for postgres, but its a bit more complex.

Since each service may have its own postgres instance, I wonder what I can do that is similar? If compose secrets supported renaming (they don't, but I am using here to illustrate my ultimate goal), I would have something like:

# same as above, but adding
  backup:
    environment:
      - SOMESERVICE_PGHOST=someservice
      - SOMESERVICE_PGUSER=someservice_pguser
      - SOMESERVICE_PGDB=someservice_pgdb
    secrets:
      - SOMESERVICE_PGPASS:PGPASS

I hope this makes some sense and we can start a discussion / show an example of how to do that kind of pattern

Understanding the encryption

Thanks for providing this docker container!

I am wondering about the encryption used by duplicity. I assumed is uses GPG to encrypt the compressed files with a public/private key pair. The passphrase is than used to secure this keypair.

I backed up some files on one machine and then restored them on another machine. Normally, I would have expected this to not work out-of-the-box, since the second machine would generate a different GPG key and that the passphrase is not sufficient. However, providing the same passphrase as the one which was used to backup the data on the first machine was sufficient.

Therefore, I am wondering how the encrypt / key generation actually works here.

Question b2

Does you setup support backup to Backblaze B2 ?

Cheers!
Pascal

Question / Feature Request: automatic service stop and restart during backup

Hi there,

i am searching for a replacement for volumerize https://github.com/blacklabelops/volumerize, since this project is now deprecated blacklabelops/volumerize#59.

I am searching especially for a service, which i can use in a repeatable template way over different docker-compose stacks. My main goal is very little maintenance effort, so downtimes during backup are fine for me. That was the reason why i loved the idea of automatically stopping and starting the services under backup by volumerize. This is a very generic way to ensure data consistency between several services in a service stack.

So may it be possible to add this feature also in your backup service? When this is in place, i think your service could be an drop-in replacement for the project with >2m docker pulls and 320 github stars.

urllib3 or chardet, not supported side package

Everytime i run something in tecnativa/duplicity:docker, i get the following warning:

/usr/local/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.2) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)

Encoding Error

Hi,

I'm facing an encoding error when the mail is sent :

 File "/etc/periodic/weekly/jobrunner", line 108, in <module>
    smtp.sendmail(from_, to, "\r\n".join(message))
  File "/usr/local/lib/python3.8/smtplib.py", line 859, in sendmail
    msg = _fix_eols(msg).encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 1055 

Is there a way to pre-encode (or remove wrong chars from the messages) before calling smtp.sendmail() ?

Thank you for your amazing job by the way ! :)

Unable to restore

Hi, I'm trying for a week to restore an odoo backup stored in s3 bucket via docker duplicity postgres-s3 image but I'm not able to get it success...
This is the command I'm running:
$ docker-compose -f prod.yaml exec backup restore --time "2020-06-18T02:00:19+02:00" --force

and then I'm getting these warnings and errors:

Warning, found the following local orphaned signature files:

Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Sun Jun 21 01:00:34 2020
Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 157, in <module>
    if u"Forced assertion for testing" in util.uexc(e):
  File "/usr/local/lib/python2.7/site-packages/duplicity/util.py", line 126, in uexc
    return fsdecode(m)
  File "/usr/local/lib/python2.7/site-packages/duplicity/util.py", line 74, in fsdecode
    return bytes_filename.decode(globals.fsencoding, u"replace")
AttributeError: 'int' object has no attribute 'decode'

What I'm doing wrong?
Thanks a lot in advance,

Feature request: support healthchecks

It would be really great if the image supported healthchecks. It would be as easy as setting a URL in an env var, then sending a request to it in the backup or dup script. I can make a PR if you'd like!

Error with oslo.config library with Python 3.10

Hi,
I have just tested both latest/3.0.3 and master/edge versions of docker-duplicity-postgres and I get the following errors (using swift for pushing backups to OpenStack Object Storage) :

Traceback (innermost last):
  File "/usr/local/bin/duplicity", line 87, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 70, in with_tempdir
    fn()
  File "/usr/local/lib/python3.10/site-packages/duplicity/dup_main.py", line 1567, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/local/lib/python3.10/site-packages/duplicity/commandline.py", line 1244, in ProcessCommandLine
    config.backend = backend.get_backend(args[0])
  File "/usr/local/lib/python3.10/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/local/lib/python3.10/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/local/lib/python3.10/site-packages/duplicity/backends/swiftbackend.py", line 39, in __init__
    from swiftclient.service import SwiftService
  File "/usr/local/lib/python3.10/site-packages/swiftclient/__init__.py", line 19, in <module>
    from .client import *  # noqa
  File "/usr/local/lib/python3.10/site-packages/swiftclient/client.py", line 54, in <module>
    from keystoneclient.v2_0 import client as ksclient_v2
  File "/usr/local/lib/python3.10/site-packages/keystoneclient/v2_0/__init__.py", line 1, in <module>
    from keystoneclient.v2_0.client import Client  # noqa
  File "/usr/local/lib/python3.10/site-packages/keystoneclient/v2_0/client.py", line 19, in <module>
    from keystoneclient.auth.identity import v2 as v2_auth
  File "/usr/local/lib/python3.10/site-packages/keystoneclient/auth/__init__.py", line 16, in <module>
    from keystoneclient.auth.conf import *  # noqa
  File "/usr/local/lib/python3.10/site-packages/keystoneclient/auth/conf.py", line 14, in <module>
    from oslo_config import cfg
  File "/usr/local/lib/python3.10/site-packages/oslo_config/cfg.py", line 2303, in <module>
    class ConfigOpts(collections.Mapping):
 AttributeError: module 'collections' has no attribute 'Mapping'

Looking at versions of dependencies installed, I see that this docker is using quite old keystoneclient and oslo.config versions.
In Python 3.10 Mapping was moved from collections to collections.abc which is not done in oslo.config version 4.12 used here.
This issue is fixed in oslo.config since 3 years (here : https://opendev.org/openstack/oslo.config/commit/6c951ed373f443727a8ea2d10d346ad769285aa2)

Would it therefore be possible to update at least oslo.config ? (and since both keystoneclient and novaclient depends on this one, maybe these could be updated as well) ?
I am not sure how this should be done here, but if you guide me I could start a PR ?

Best Regards,

NameError: name 'smtp' is not defined

When testing backups in my production environment, sending an e-mail fails with the following error. I assume it's a simple matter of a dependency not being automatically installed when deploying the container?

INFO:jobrunner:Sending email report
Traceback (most recent call last):
  File "/etc/periodic/weekly/jobrunner", line 89, in <module>
    smtp.quit()
NameError: name 'smtp' is not defined

Is it possible to run remove-older-than through to duplicity

I tried running this to see if it would work to clean up the older backups, but see it fails. Would there be an environment variable or something that would support configuring this?

docker-compose exec backup duplicity remove-older-than 1Y
Command line error: Expected 1 args, got 0
Enter 'duplicity --help' for help screen.

Raspberry Pi 4 Support

Trying to bring this up on a Pi4 Raspbian install (32-bit ARM v8) I get the following error:

standard_init_linux.go:211: exec user process caused "exec format error"

I believe that this image should work, given the architecture support in the base image of python:2-alpine.

Is this just a tagging issue, or would we need to build from a different base image?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.