Want to subscribe to topics you're interested in?
Become a Member

Sysadmin duplicity ask for python-urllib3 >= 1.10.2-1

Discussion in 'System Administration' started by Kintaro, Apr 26, 2020.

  1. Kintaro

    Kintaro Member

    106
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    6:52 AM
    1.15.x
    MariaDB 10
    I would like to use duplicity to make backups.

    Right now I installed ninjabackup and is working (I don't know how as duplicity is not installed, maybe has its own duplicity binary?), but I would like use duplicity "standalone" but if I try:


    Code (Text):
    yum install duplicity

    I get:
    Code (Text):
    Error: Package: python-requests-2.6.0-9.el7_7.noarch (updates)
                Requires: python-urllib3 >= 1.10.2-1
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest


    I read on the forum that centminmod require a lower python-urllib3 version, am I right?
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,245
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    2:52 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You can install Python 3.6 besides CentOS 7's Python 2.7 using via Centmin Mod 123.09beta01's addons/python36_install.sh and then setup Python 3.6 binary virtual environment for install just Duplicity as outlined at Sysadmin - CentOS 7 Python 2.7 will reach the end of its life on January 1st, 2020. This way you get newer Duplicity 0.8.12+ version instead of EPEL YUM repo's 0.7.19 version.
    Code (Text):
    yum list duplicity -q | tr -s ' ' | column -t
    Available         Packages
    duplicity.x86_64  0.7.19-1.el7  epel
    

    Install Duplicity On CentOS 7 Via PIP



    I haven't used duplicity myself, but installs ok after Centmin Mod 123.09beta01's addons/python36_install.sh installs Python 3.6
    Code (Text):
    pip install virtualenv
    mkdir -p /home/python_projects
    cd /home/python_projects
    virtualenv -p /usr/bin/python3.6 duplicityenv
    source /home/python_projects/duplicityenv/bin/activate
    # pip doesn't like ccache so disable it
    export CC='gcc'
    export CXX="g++"
    # pip needs a tmp directory that doesn't have noexec restrictions
    mkdir -p /home/piptmp
    chmod 1777 /home/piptmp
    export TMPDIR=/home/piptmp
    # update pip defined by -p flag to use python3.6 binary
    pip install -U pip
    pip --version
    yum -y install librsync librsync-devel
    pip install urllib3
    pip install duplicity
    

    Setup alias command shortcuts so you can just type word = duplicity instead of = /home/python_projects/duplicityenv/bin/python3 /home/python_projects/duplicityenv/bin/duplicity
    Code (Text):
    alias duplicity='/home/python_projects/duplicityenv/bin/python3 /home/python_projects/duplicityenv/bin/duplicity'
    if [[ ! "$(grep -w 'duplicity' /root/.bashrc)" ]]; then echo "alias duplicity='/home/python_projects/duplicityenv/bin/python3 /home/python_projects/duplicityenv/bin/duplicity'" >> /root/.bashrc; fi
    

    example output from creating Python 3.6 virtualenv called duplicityenv
    Code (Text):
    virtualenv -p /usr/bin/python3.6 duplicityenv
    created virtual environment CPython3.6.8.final.0-64 in 290ms
      creator CPython3Posix(dest=/home/python_projects/duplicityenv, clear=False, global=False)
      seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/root/.local/share/virtualenv/seed-app-data/v1.0.1)
      activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
    

    If updating Duplicity in future
    Code (Text):
    # pip doesn't like ccache so disable it
    export CC='gcc'
    export CXX="g++"
    # pip needs a tmp directory that doesn't have noexec restrictions
    mkdir -p /home/piptmp
    chmod 1777 /home/piptmp
    export TMPDIR=/home/piptmp
    source /home/python_projects/duplicityenv/bin/activate
    pip install -U duplicity
    

    After activating the environment
    Code (Text):
    source /home/python_projects/duplicityenv/bin/activate
    

    You can then yum install librsync packages and do update pip, install urllib3 and duplicity within the activated environment
    Code (Text):
    pip install duplicity
    Collecting duplicity
      Using cached duplicity-0.8.12.1618.tar.gz (649 kB)
    Requirement already satisfied: fasteners in ./lib/python3.6/site-packages (from duplicity) (0.15)
    Requirement already satisfied: future in ./lib/python3.6/site-packages (from duplicity) (0.18.2)
    Requirement already satisfied: monotonic>=0.1 in ./lib/python3.6/site-packages (from fasteners->duplicity) (1.5)
    Requirement already satisfied: six in ./lib/python3.6/site-packages (from fasteners->duplicity) (1.14.0)
    Building wheels for collected packages: duplicity
      Building wheel for duplicity (setup.py) ... done
      Created wheel for duplicity: filename=duplicity-0.8.12.0-cp36-cp36m-linux_x86_64.whl size=737330 sha256=895119c66fd041eebd15c8aab50c3414ffd9186ba19ffda7112f485eac6de28d
      Stored in directory: /root/.cache/pip/wheels/74/94/df/d8cfacf296328fa0fe3a67371ede7909e4935c5881b6f607cf
    Successfully built duplicity
    Installing collected packages: duplicity
    Successfully installed duplicity-0.8.12.0

    Code (Text):
    ls -lah /home/python_projects/duplicityenv/bin/
    total 100K
    drwxr-xr-x 2 root root 4.0K Apr 26 10:37 .
    drwxr-xr-x 6 root root 4.0K Apr 26 10:37 ..
    -rw-r--r-- 1 root root 2.2K Apr 26 10:26 activate
    -rw-r--r-- 1 root root 1.5K Apr 26 10:26 activate.csh
    -rw-r--r-- 1 root root 3.1K Apr 26 10:26 activate.fish
    -rw-r--r-- 1 root root 1.8K Apr 26 10:26 activate.ps1
    -rw-r--r-- 1 root root 1.3K Apr 26 10:26 activate_this.py
    -rw-r--r-- 1 root root 1.2K Apr 26 10:26 activate.xsh
    -rwxr-xr-x 1 root root 4.9K Apr 26 10:37 duplicity
    -rwxr-xr-x 1 root root  259 Apr 26 10:26 easy_install
    -rwxr-xr-x 1 root root  259 Apr 26 10:26 easy_install3
    -rwxr-xr-x 1 root root  259 Apr 26 10:26 easy_install-3.6
    -rwxr-xr-x 1 root root  244 Apr 26 10:33 futurize
    -rwxr-xr-x 1 root root  246 Apr 26 10:33 pasteurize
    -rwxr-xr-x 1 root root  250 Apr 26 10:26 pip
    -rwxr-xr-x 1 root root  250 Apr 26 10:26 pip3
    -rwxr-xr-x 1 root root  250 Apr 26 10:26 pip-3.6
    -rwxr-xr-x 1 root root  250 Apr 26 10:26 pip3.6
    lrwxrwxrwx 1 root root   18 Apr 26 10:26 python -> /usr/bin/python3.6
    lrwxrwxrwx 1 root root    6 Apr 26 10:26 python3 -> python
    lrwxrwxrwx 1 root root    6 Apr 26 10:26 python3.6 -> python
    -rwxr-xr-x 1 root root 9.0K Apr 26 10:37 rdiffdir
    -rwxr-xr-x 1 root root  237 Apr 26 10:26 wheel
    -rwxr-xr-x 1 root root  237 Apr 26 10:26 wheel3
    -rwxr-xr-x 1 root root  237 Apr 26 10:26 wheel-3.6
    

    Code (Text):
    ls -lah /home/python_projects/duplicityenv/lib/python3.6/site-packages/
    total 144K
    drwxr-xr-x 21 root root 4.0K Apr 26 10:33 .
    drwxr-xr-x  3 root root 4.0K Apr 26 10:26 ..
    -rw-r--r--  1 root root  126 Apr 26 10:26 easy_install.py
    drwxr-xr-x  4 root root 4.0K Apr 26 10:33 fasteners
    drwxr-xr-x  2 root root 4.0K Apr 26 10:33 fasteners-0.15.dist-info
    drwxr-xr-x 10 root root 4.0K Apr 26 10:33 future
    drwxr-xr-x  2 root root 4.0K Apr 26 10:33 future-0.18.2.dist-info
    drwxr-xr-x  4 root root 4.0K Apr 26 10:33 libfuturize
    drwxr-xr-x  4 root root 4.0K Apr 26 10:33 libpasteurize
    drwxr-xr-x  2 root root 4.0K Apr 26 10:33 monotonic-1.5.dist-info
    -rw-r--r--  1 root root 7.0K Apr 26 10:33 monotonic.py
    drwxr-xr-x  7 root root 4.0K Apr 26 10:33 past
    drwxr-xr-x  5 root root 4.0K Apr 26 10:26 pip
    drwxr-xr-x  2 root root 4.0K Apr 26 10:26 pip-20.0.2.dist-info
    -rw-r--r--  1 root root    0 Apr 26 10:26 pip-20.0.2.virtualenv
    drwxr-xr-x  5 root root 4.0K Apr 26 10:33 pkg_resources
    drwxr-xr-x  2 root root 4.0K Apr 26 10:33 __pycache__
    drwxr-xr-x  6 root root 4.0K Apr 26 10:33 setuptools
    drwxr-xr-x  2 root root 4.0K Apr 26 10:26 setuptools-46.1.3.dist-info
    -rw-r--r--  1 root root    0 Apr 26 10:26 setuptools-46.1.3.virtualenv
    drwxr-xr-x  2 root root 4.0K Apr 26 10:33 six-1.14.0.dist-info
    -rw-r--r--  1 root root  34K Apr 26 10:33 six.py
    drwxr-xr-x  6 root root 4.0K Apr 26 10:33 urllib3
    drwxr-xr-x  2 root root 4.0K Apr 26 10:33 urllib3-1.25.9.dist-info
    -rw-r--r--  1 root root   18 Apr 26 10:26 _virtualenv.pth
    -rw-r--r--  1 root root 4.6K Apr 26 10:26 _virtualenv.py
    drwxr-xr-x  4 root root 4.0K Apr 26 10:27 wheel
    drwxr-xr-x  2 root root 4.0K Apr 26 10:26 wheel-0.34.2.dist-info
    -rw-r--r--  1 root root    0 Apr 26 10:26 wheel-0.34.2.virtualenv
    

    Code (Text):
    /home/python_projects/duplicityenv/bin/python3.6 --version
    Python 3.6.8
    
    /home/python_projects/duplicityenv/bin/pip3.6 --version
    pip 20.0.2 from /home/python_projects/duplicityenv/lib/python3.6/site-packages/pip (python 3.6)
    
    /home/python_projects/duplicityenv/bin/pip --version
    pip 20.0.2 from /home/python_projects/duplicityenv/lib/python3.6/site-packages/pip (python 3.6)
    
    /home/python_projects/duplicityenv/bin/duplicity -V
    duplicity 0.8.12
    
    duplicity -V
    duplicity 0.8.12
    

    Code (Text):
    /home/python_projects/duplicityenv/bin/duplicity --help
    Usage:
      duplicity [full|incremental] [options] source_dir target_url
      duplicity [restore] [options] source_url target_dir
      duplicity verify [options] source_url target_dir
      duplicity collection-status [options] target_url
      duplicity list-current-files [options] target_url
      duplicity cleanup [options] target_url
      duplicity remove-older-than time [options] target_url
      duplicity remove-all-but-n-full count [options] target_url
      duplicity remove-all-inc-of-but-n-full count [options] target_url
      duplicity replicate source_url target_url
    Backends and their URL formats:
      azure://container_name
      b2://account_id[:application_key]@bucket_name/[some_dir/]
      boto3+s3://bucket_name[/prefix]
      cf+http://container_name
      dpbx:///some_dir
      file:///some_dir
      ftp://user[:password]@other.host[:port]/some_dir
      ftps://user[:password]@other.host[:port]/some_dir
      gdocs://user[:password]@other.host/some_dir
      hsi://user[:password]@other.host[:port]/some_dir
      imap://user[:password]@other.host[:port]/some_dir
      mega://user[:password]@other.host/some_dir
      mf://user[:password]@other.host/some_dir
      onedrive://some_dir
      pca://container_name
      pydrive://user@other.host/some_dir
      rclone://remote:/some_dir
      rsync://user[:password]@other.host[:port]/relative_path
      rsync://user[:password]@other.host[:port]//absolute_path
      rsync://user[:password]@other.host[:port]::/module/some_dir
      s3+http://bucket_name[/prefix]
      s3://other.host[:port]/bucket_name[/prefix]
      scp://user[:password]@other.host[:port]/some_dir
      ssh://user[:password]@other.host[:port]/some_dir
      swift://container_name
      tahoe://alias/directory
      webdav://user[:password]@other.host/some_dir
      webdavs://user[:password]@other.host/some_dir
    Commands:
      cleanup <target_url>
      collection-status <target_url>
      full <source_dir> <target_url>
      incr <source_dir> <target_url>
      list-current-files <target_url>
      restore <source_url> <target_dir>
      remove-older-than <time> <target_url>
      remove-all-but-n-full <count> <target_url>
      remove-all-inc-of-but-n-full <count> <target_url>
      verify <target_url> <source_dir>
      replicate <source_url> <target_url>
    Options:
      -h, --help            show this help message and exit
      --allow-source-mismatch
      --archive-dir=path
      --asynchronous-upload
      --compare-data
      --copy-links
      --dry-run
      --encrypt-key=gpg-key-id
      --encrypt-secret-keyring=path
      --encrypt-sign-key=gpg-key-id
      --exclude=shell_pattern
      --exclude-device-files
      --exclude-filelist=filename
      --exclude-if-present=filename
      --exclude-other-filesystems
      --exclude-regexp=regular_expression
      --exclude-older-than=time
      --file-prefix=FILE_PREFIX
      --file-prefix-manifest=FILE_PREFIX_MANIFEST
      --file-prefix-archive=FILE_PREFIX_ARCHIVE
      --file-prefix-signature=FILE_PREFIX_SIGNATURE
      -r path, --file-to-restore=path
      --force
      --ftp-passive
      --ftp-regular
      --full-if-older-than=time
      --gio
      --gpg-binary=path
      --gpg-options=options
      --hidden-encrypt-key=gpg-key-id
      --ignore-errors
      --imap-full-address
      --imap-mailbox=imap_mailbox
      --include=shell_pattern
      --include-filelist=filename
      --include-regexp=regular_expression
      --log-fd=file_descriptor
      --log-file=filename
      --max-blocksize=number
      --name=backup name
      --no-encryption
      --no-compression
      --no-print-statistics
      --null-separator
      --num-retries=number
      --numeric-owner
      --old-filenames
      --metadata-sync-mode=METADATA_SYNC_MODE
      --par2-redundancy=number
      --par2-options=options
      --progress
      --progress-rate=number
      --pydevd
      --rename=RENAME
      -t time, --restore-time=time, --time=time
      --rsync-options=options
      --s3-european-buckets
      --s3-use-rrs
      --s3-use-ia
      --s3-use-glacier
      --s3-use-deep-archive
      --s3-use-onezone-ia
      --s3-use-new-style
      --s3-unencrypted-connection
      --s3-multipart-chunk-size=number
      --s3-multipart-max-procs=number
      --s3-multipart-max-timeout=number
      --s3-use-multiprocessing
      --s3-use-server-side-encryption
      --s3-use-server-side-kms-encryption
      --s3-kms-key-id=S3_KMS_KEY_ID
      --s3-kms-grant=S3_KMS_GRANT
      --swift-storage-policy=policy
      --azure-max-single-put-size=number
      --azure-max-block-size=number
      --azure-max-connections=number
      --azure-blob-tier=Hot|Cool|Archive
      --scp-command=command
      --sftp-command=command
      --cf-backend=pyrax|cloudfiles
      --short-filenames
      --sign-key=gpg-key-id
      --ssh-askpass
      --ssh-options=options
      --ssl-cacert-file=pem formatted bundle of certificate authorities
      --ssl-cacert-path=path to a folder with certificate authority files
      --ssl-no-check-certificate
      --tempdir=path
      --timeout=seconds
      --time-separator=char
      --use-agent
      -v [0-9], --verbosity=[0-9]
      -V, --version
      --volsize=number
      --file-changed=path
      --backend-retry-delay=seconds

    Quick test
    Code (Text):
    duplicity full -v2 --no-encryption /home/duplicity1/ file:///home/duplicity2/
    --------------[ Backup Statistics ]--------------
    StartTime 1587900099.60 (Sun Apr 26 11:21:39 2020)
    EndTime 1587900099.60 (Sun Apr 26 11:21:39 2020)
    ElapsedTime 0.00 (0.00 seconds)
    SourceFiles 2
    SourceFileSize 4096 (4.00 KB)
    NewFiles 2
    NewFileSize 4096 (4.00 KB)
    DeletedFiles 0
    ChangedFiles 0
    ChangedFileSize 0 (0 bytes)
    ChangedDeltaSize 0 (0 bytes)
    DeltaEntries 2
    RawDeltaSize 0 (0 bytes)
    TotalDestinationSizeChange 128 (128 bytes)
    Errors 0
    -------------------------------------------------
    

    Code (Text):
    ls -lahR /home/duplicity1/ /home/duplicity2/
    
    /home/duplicity1/:
    total 8.0K
    drwxr-xr-x   2 root root 4.0K Apr 26 11:18 .
    drwxr-xr-x. 54 root root 4.0K Apr 26 11:17 ..
    -rw-r--r--   1 root root    0 Apr 26 11:18 file1.txt
    
    /home/duplicity2/:
    total 20K
    drwxr-xr-x   2 root root 4.0K Apr 26 11:21 .
    drwxr-xr-x. 54 root root 4.0K Apr 26 11:17 ..
    -rw-------   1 root root  203 Apr 26 11:21 duplicity-full.20200426T112139Z.manifest
    -rw-------   1 root root  128 Apr 26 11:21 duplicity-full.20200426T112139Z.vol1.difftar.gz
    -rw-------   1 root root  173 Apr 26 11:21 duplicity-full-signatures.20200426T112139Z.sigtar.gz
    

    Code (Text):
    cat /home/duplicity2/duplicity-full.20200426T112139Z.manifest
    Hostname host.domain.com
    Localdir /home/duplicity1
    Volume 1:
        StartingPath   .
        EndingPath     file1.txt
        Hash SHA1 0f7dad74ba0280a9487abde0cd7e5a3424bc8ab0
    Filelist 1
        new      file1.txt

    Code (Text):
    duplicity list-current-files file:///home/duplicity2/
    Local and Remote metadata are synchronized, no sync needed.
    Last full backup date: Sun Apr 26 11:21:39 2020
    Sun Apr 26 11:18:03 2020 .
    Sun Apr 26 11:18:03 2020 file1.txt
    

    Test removal of file and restore
    Code (Text):
    rm -f /home/duplicity1/file1.txt
    
    duplicity -v2 --no-encryption --file-to-restore file1.txt file:///home/duplicity2/ /home/duplicity1/file1.txt
    
    ls -lahR /home/duplicity1/ /home/duplicity2/
    
    /home/duplicity1/:
    total 8.0K
    drwxr-xr-x   2 root root 4.0K Apr 26 11:33 .
    drwxr-xr-x. 54 root root 4.0K Apr 26 11:33 ..
    -rw-r--r--   1 root root    0 Apr 26 11:18 file1.txt
    
    /home/duplicity2/:
    total 20K
    drwxr-xr-x   2 root root 4.0K Apr 26 11:21 .
    drwxr-xr-x. 54 root root 4.0K Apr 26 11:33 ..
    -rw-------   1 root root  203 Apr 26 11:21 duplicity-full.20200426T112139Z.manifest
    -rw-------   1 root root  128 Apr 26 11:21 duplicity-full.20200426T112139Z.vol1.difftar.gz
    -rw-------   1 root root  173 Apr 26 11:21 duplicity-full-signatures.20200426T112139Z.sigtar.gz
    

    or more verbose restore
    Code (Text):
    duplicity -v4 --no-encryption --file-to-restore file1.txt file:///home/duplicity2/ /home/duplicity1/file1.txt
    Local and Remote metadata are synchronized, no sync needed.
    Last full backup date: Sun Apr 26 11:21:39 2020
    


    Rest is up to you as no guarantees on my end.
     
  3. Kintaro

    Kintaro Member

    106
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    6:52 AM
    1.15.x
    MariaDB 10
    Thank you @eva2000

    Now I have a minor issue. I'm trying to call duplicity within a script (a backupninja script that I would like to not edit), and the script give error about duplicity "command not found".

    if I "locate" duplicity I can see that locate index see it in
    Code (Text):
    [16:27][root@domain.com ~]# locate duplicity | grep bin
    /usr/bin/duplicity
    


    but there's no duplicity in it:

    Code (Text):
    [16:11][root@domain.com ~]# ls -la /usr/bin/dup*
    ls: impossibile accedere a /usr/bin/dup*: File o directory non esistente


    I already created the alias as you suggested and it's working but the script can't run it.

    Code (Text):
    [16:20][root@domain.com ~]# which duplicity
    alias duplicity='/home/python_projects/duplicityenv/bin/python3 /home/python_projects/duplicityenv/bin/duplicity'
        /home/python_projects/duplicityenv/bin/python3


    Code (Text):
    [16:14][root@domain.com ~]# duplicity -V
    duplicity 0.8.12


    To fix it am I need to run "locate updatedb"?
    It will not compromise centminmod, right?

    or I need to create a symlink in /usr/bin/duplicity ?
     
    Last edited: Apr 27, 2020
  4. eva2000

    eva2000 Administrator Staff Member

    55,245
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    2:52 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    A symlink won't work for Python virtual environment install of Duplicity

    If you're calling from a script it may not see the alias command, so replace
    Code (Text):
    /usr/bin/duplicity

    with
    Code (Text):
    /home/python_projects/duplicityenv/bin/python3 /home/python_projects/duplicityenv/bin/duplicity
    

    scripting you can just call it from a variable i.e. shell scripting
    Code (Text):
    DUPLICITYBIN='/home/python_projects/duplicityenv/bin/python3 /home/python_projects/duplicityenv/bin/duplicity'

    example
    Code (Text):
    #!/bin/bash
    DUPLICITYBIN='/home/python_projects/duplicityenv/bin/python3 /home/python_projects/duplicityenv/bin/duplicity'
    
    $DUPLICITYBIN full -v2 --no-encryption /home/duplicity1/ file:///home/duplicity2/
    


    Are you running the script as a non-root user ?
     
    Last edited: Apr 27, 2020
  5. Kintaro

    Kintaro Member

    106
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    6:52 AM
    1.15.x
    MariaDB 10
    the script runs as root

    the only problem is that duplicity is called from a backupninja script that I would like to not modify because, probably, during updates it will get overwritten.

    if it's not possible, I'm going to use "raw" duplicity instead of backupninja

    anyway... a little OT but: is it safe to run "locate updatedb"? I can't understand why /usr/bin/duplicity is in that index when in /usr/bin there's no trace of it.

    maybe I messed it up in same way without noticing it
     
    Last edited: Apr 27, 2020
  6. eva2000

    eva2000 Administrator Staff Member

    55,245
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    2:52 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    updatedb command is safe to run

    other way of script calling virtualenv based duplicity is via adding source line to activate the Python virtualenv you created for dupliciity
    Code (Text):
    #!/bin/bash
    source "/home/python_projects/duplicityenv/bin/activate"
    duplicity full -v2 --no-encryption /home/duplicity1/ file:///home/duplicity2/
    

    Not sure how backupninja script runs, but you could wrap that script within a shell script with the source line and see if that works
    Code (Text):
    #!/bin/bash
    source "/home/python_projects/duplicityenv/bin/activate"
    your_backupninja_script
    

    source activate basically puts Python virtualenv binary path
    /home/python_projects/duplicityenv/bin within your $PATH environment
     
  7. Kintaro

    Kintaro Member

    106
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    6:52 AM
    1.15.x
    MariaDB 10
    I'm going to use this, I just ran a test and didn't throw errors.

    It puts Python virtualenv binary path only for the specific script that is calling activation, right?

    I wrote down in my documentation that in case of backninja update I need to check and maybe modify again its dup script.
     
  8. eva2000

    eva2000 Administrator Staff Member

    55,245
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    2:52 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah for the script wrapper it (source line) is contained within
     
  9. Kintaro

    Kintaro Member

    106
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    6:52 AM
    1.15.x
    MariaDB 10
    here we go again :D

    Centmin was asking to run:
    Code (Text):
    /usr/bin/python2 -m pip install --upgrade pip


    After run it (I didn't remember any other thing done to the server):

    I got again backupninja that complain about duplicity:
    Code (Text):
    *failed* -- /etc/backup.d/20-files.dup
    
    == fatal errors from /etc/backup.d/20-files.dup ==
    
    Warning: Duplicity cleanup failed.
    Warning: Duplicity remove-older-than failed.
    Error: bash: duplicity: command not found
    Fatal: Duplicity failed.


    I noticed that:
    Code (Text):
    /usr/share/backupninja/dup

    doens't include anymore:
    Code (Text):
    source "/home/python_projects/duplicityenv/bin/activate"

    how can be possible?!
    it can't be a duplicity update because it is the same version as before:
    Code (Text):
    [19:57][root@domain.com ~]# duplicity -V
    duplicity 0.8.12
    


    :wtf:
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,245
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    2:52 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    /usr/share/backupninja/dup is a file you manually created ? with source active within it ? pip install update wouldn't touch a manually created file
     
  11. Kintaro

    Kintaro Member

    106
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    6:52 AM
    1.15.x
    MariaDB 10
    no is the file that backupninja use to call duplicity. is a backupninja core file.
    really really strange... I'm missing something.

    now a restored my mod in /usr/share/backupninja/dup and it's working again, let's see if happens again.
     
  12. eva2000

    eva2000 Administrator Staff Member

    55,245
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    2:52 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    don't need to mod dup file just use a wrapper script as outlined at Sysadmin - duplicity ask for python-urllib3 >= 1.10.2-1 to active python source and then run dup file