Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cant backup with duplicity...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 372

PostPosted: Sun Mar 10, 2019 6:09 pm    Post subject: Cant backup with duplicity... Reply with quote

I have a backup scheme using duplicity and onedrive that has been working flawlessly for more than a year now. I usually backup in a weekly basis, but for other reasons I have not performed a backup since early January. Today I tried and got the following error:


Code:

-> ~> duplicity --gpg-options="--pinentry-mode=loopback"  --hidden-encrypt-key=XXXXXXXX --sign-key=YYYYYYYY /home/mirror onedrive://mybackup/
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1375, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1117, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1006, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/onedrivebackend.py", line 91, in __init__
    self.resolve_directory()
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/onedrivebackend.py", line 189, in resolve_directory
    files = self.get_files(object_id)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/onedrivebackend.py", line 218, in get_files
    response.raise_for_status()
  File "/usr/lib64/python2.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
HTTPError: 410 Client Error: Gone for url: https://apis.live.net/v5.0/me/skydrive/files


I confess I have little to no understanding of python, so those python error messages are impossible for me. But usually those error messages appear when using duplicity because you need to re-authorize your computer accessing onedrive via duplicity. What I have always done on those cases is just delete the file ".duplicity_onedrive_oauthtoken.json" and retry. That triggers another log in process into onedrive, where I have to login again and place a given URL again into the prompt. Just like that:

Code:

~> duplicity --gpg-options="--pinentry-mode=loopback"  --hidden-encrypt-key=XXXXXXXX --sign-key=YYYYYYYY /home/mirror onedrive://mybackup/
Could not load OAuth2 token. Trying to create a new one. (original error: [Errno 2] No such file or directory: '/home/vinicius/.duplicity_onedrive_oauthtoken.json')
()
In order to authorize duplicity to access your OneDrive, please open https://login.live.com/oauth20_authorize.srf?response_typeXXXXXX=touch in a browser and copy the URL of the blank page the dialog leads to.
()
URL of the blank page:


But today when I am pasting the blank URL link into the prompt I am still getting python errors and no backup:

Code:

~> duplicity --gpg-options="--pinentry-mode=loopback"  --hidden-encrypt-key=XXXXXXXX --sign-key=YYYYYYYY /home/mirror onedrive://mybackup/
Could not load OAuth2 token. Trying to create a new one. (original error: [Errno 2] No such file or directory: '/home/vinicius/.duplicity_onedrive_oauthtoken.json')
()
In order to authorize duplicity to access your OneDrive, please open https://login.live.com/oauth20_authorize.srf?response_typeXXXXXX=touch in a browser and copy the URL of the blank page the dialog leads to.
()
URL of the blank page: https://login.live.com/oauth20_desktop.srf?code=XXXXXXX
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1375, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1117, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1006, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/onedrivebackend.py", line 91, in __init__
    self.resolve_directory()
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/onedrivebackend.py", line 189, in resolve_directory
    files = self.get_files(object_id)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/onedrivebackend.py", line 218, in get_files
    response.raise_for_status()
  File "/usr/lib64/python2.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
HTTPError: 410 Client Error: Gone for url: https://apis.live.net/v5.0/me/skydrive/files
~>


Here are my use flags for duplicity:

Code:

~> equery uses duplicity
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for app-backup/duplicity-0.7.10:
 U I
 + + python_targets_python2_7 : Build with Python 2.7
 - - s3                       : Support for backing up to the Amazon S3 system
 - - test                     : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
~>



and this is my emerge --info

Code:

~> emerge --info
Portage 2.3.51 (python 2.7.15-final-0, default/linux/amd64/17.0/hardened/selinux, gcc-8.2.0, glibc-2.27-r6, 4.19.23-gentoo x86_64)
=================================================================
System uname: Linux-4.19.23-gentoo-x86_64-Intel-R-_Core-TM-_i7-6500U_CPU_@_2.50GHz-with-gentoo-2.6
KiB Mem:    16110292 total,   3829728 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 09 Mar 2019 17:30:01 +0000
Head commit of repository gentoo: 5522fe8147325ca20d6fc51f038b961ea61076ba
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:



gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nostrip parallel-fetch preserve-libs protect-owned sandbox selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.lug.udel.edu/pub/gentoo/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://mirror.bytemark.co.uk/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en pt pt_BR zh_CN"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa amd64 bzip2 consolekit crypt cxx dbus fortran gphoto2 hardened iconv ipv6 lapack libtirpc multilib ncurses nls nptl openmp pam pcre pie policykit readline savedconfig seccomp selinux ssl ssp symlink threads udev unicode xattr xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="ptp2 samsung" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en pt pt-BR zh zh-CN" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" SANE_BACKENDS="hpaio" USERLAND="GNU" VIDEO_CARDS="intel nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac
delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Is there something new in duplicity or there is something broke in my install? Thank you all.
Back to top
View user's profile Send private message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 372

PostPosted: Sun Mar 10, 2019 6:20 pm    Post subject: Reply with quote

That is bad news for me I guess. Just found out this bug in duplicity. Apparently onedrive changed something and every code that interacts with it has to be adapted as well. According to the bug message this is being done for the new version:

Quote:

Changed in duplicity:
assignee: nobody → Kenneth Loafman (kenneth-loafman)
importance: Undecided → High
milestone: none → 0.7.19
status: New → In Progress


which is 0.7.19, although in gentoo the last stable version is 0.7.10 and the most recent version being considered in gentoo is 0.7.17. Is there anything that can be done or it is just a matter of waiting? Thank you all.
Back to top
View user's profile Send private message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 372

PostPosted: Sun Mar 10, 2019 6:22 pm    Post subject: Reply with quote

Should I post it as a bug in Gentoo?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21863

PostPosted: Sun Mar 10, 2019 7:23 pm    Post subject: Reply with quote

If version 0.7.19 is available and has been for long enough that someone should have noticed by now (that is, don't post bumps the same day upstream releases, unless there is a demonstrated pattern of the maintainer not noticing such releases for weeks), and there is no version bump bug, then yes, a bug would be appropriate to alert the Gentoo maintainers that a bump is required. Mention also that the bump is important for a bugfix, not merely a feature improvement. There is a bump request for 0.7.18, but according to your post, that is too old to help you.
Back to top
View user's profile Send private message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 372

PostPosted: Sun Mar 10, 2019 11:26 pm    Post subject: Reply with quote

Thank you Hu for your reply. I guess than it wont be the case to post a bug, since version 0.7.19 has not been released yet. According to the upstream website the last released version is 0.7.18.2 and dates back to October 2018, and the bug report I have posted dates back to january 2019. Since the bug report did not came from the upstream website I am going to try to contact the upstream to check if there is indeed a new version in development which would handle the issue. Thank you again!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum