New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

TKLBAM failing to backup - duplicity 'AssertionError' #753

Open
JedMeister opened this Issue Jan 13, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@JedMeister
Member

JedMeister commented Jan 13, 2017

I have noted this as a bug, although it's likely that this is something of an edge case, so perhaps this is actually a feature request for better error handling rather than actually a bug? I'll let you decide which it really is! 馃槃

The workaround is tacked on the bottom.

Ronan0 reported in the forums that his TKLBAM backups stopped working for no apparent reason. His full tklbam-backup.log is uploaded here but the important/relevant part are the number of entries like this:

# export PASSPHRASE=$(cat /var/lib/tklbam/secret)
# duplicity --verbosity=5 --volsize=25 --full-if-older-than=1W --gpg-options=--cipher-algo=aes --include=/TKLBAM --include-filelist=/TKLBAM/fsdelta-olist --exclude=** --archive-dir=/var/cache/duplicity --s3-unencrypted-connection --allow-source-mismatch / s3://s3.amazonaws.com/tklbam-us-east-1-67de5cff790f5ed2075d/7ee23lhbnjm6b7kr
Listing s3://s3.amazonaws.com/tklbam-us-east-1-67de5cff790f5ed2075d/7ee23lhbnjm6b7kr
Local and Remote metadata are synchronized, no sync needed.
Listing s3://s3.amazonaws.com/tklbam-us-east-1-67de5cff790f5ed2075d/7ee23lhbnjm6b7kr
Traceback (most recent call last):
  File "/usr/lib/tklbam/deps/bin/duplicity", line 1405, in <module>
    with_tempdir(main)
  File "/usr/lib/tklbam/deps/bin/duplicity", line 1398, in with_tempdir
    fn()
  File "/usr/lib/tklbam/deps/bin/duplicity", line 1278, in main
    globals.archive_dir).set_values()
  File "/usr/lib/tklbam/deps/lib/python2.6/dist-packages/duplicity/collections.py", line 691, in set_values
    self.get_backup_chains(partials + backend_filename_list)
  File "/usr/lib/tklbam/deps/lib/python2.6/dist-packages/duplicity/collections.py", line 814, in get_backup_chains
    map(add_to_sets, filename_list)
  File "/usr/lib/tklbam/deps/lib/python2.6/dist-packages/duplicity/collections.py", line 804, in add_to_sets
    if set.add_filename(filename):
  File "/usr/lib/tklbam/deps/lib/python2.6/dist-packages/duplicity/collections.py", line 93, in add_filename
    self.set_manifest(filename)
  File "/usr/lib/tklbam/deps/lib/python2.6/dist-packages/duplicity/collections.py", line 124, in set_manifest
    remote_filename)
AssertionError: ('duplicity-inc.20161220T071548Z.to.20161222T071607Z.manifest.part', u'duplicity-inc.20161220T071548Z.to.20161222T071607Z.manifest.gpg')


Traceback (most recent call last):
  File "/usr/bin/tklbam-backup", line 464, in main
    log=_print)
  File "/usr/lib/tklbam/duplicity.py", line 268, in __call__
    backup_command.run(target.secret, target.credentials, debug=debug)
  File "/usr/lib/tklbam/duplicity.py", line 114, in run
    raise Error("non-zero exitcode (%d) from backup command: %s" % (exitcode, str(self)))
Error: non-zero exitcode (30) from backup command: duplicity --verbosity=5 --volsize=25 --full-if-older-than=1W --gpg-options=--cipher-algo=aes --include=/TKLBAM --include-filelist=/TKLBAM/fsdelta-olist --exclude=** --archive-dir=/var/cache/duplicity --s3-unencrypted-connection --allow-source-mismatch / s3://s3.amazonaws.com/tklbam-us-east-1-67de5cff790f5ed2075d/7ee23lhbnjm6b7kr

When he tried to run a full backup manually, he got a somewhat similar message:

Traceback (most recent call last):
  File "/usr/lib/tklbam/deps/bin/duplicity", line 1405, in <module>
    with_tempdir(main)
  File "/usr/lib/tklbam/deps/bin/duplicity", line 1398, in with_tempdir
    fn()
  File "/usr/lib/tklbam/deps/bin/duplicity", line 1278, in main
    globals.archive_dir).set_values()
  File "/usr/lib/tklbam/deps/lib/python2.6/dist-packages/duplicity/collections.py", line 691, in set_values
    self.get_backup_chains(partials + backend_filename_list)
  File "/usr/lib/tklbam/deps/lib/python2.6/dist-packages/duplicity/collections.py", line 814, in get_backup_chains
    map(add_to_sets, filename_list)
  File "/usr/lib/tklbam/deps/lib/python2.6/dist-packages/duplicity/collections.py", line 804, in add_to_sets
    if set.add_filename(filename):
  File "/usr/lib/tklbam/deps/lib/python2.6/dist-packages/duplicity/collections.py", line 93, in add_filename
    self.set_manifest(filename)
  File "/usr/lib/tklbam/deps/lib/python2.6/dist-packages/duplicity/collections.py", line 124, in set_manifest
    remote_filename)
AssertionError: ('duplicity-inc.20161220T071548Z.to.20161222T071607Z.manifest.part', u'duplicity-inc.20161220T071548Z.to.20161222T071607Z.manifest.gpg')

Traceback (most recent call last):
  File "/usr/bin/tklbam-backup", line 510, in <module>
    main()
  File "/usr/bin/tklbam-backup", line 464, in main
    log=_print)
  File "/usr/lib/tklbam/duplicity.py", line 235, in __call__
    cleanup_command.run(target.secret, target.credentials)
  File "/usr/lib/tklbam/duplicity.py", line 114, in run
    raise Error("non-zero exitcode (%d) from backup command: %s" % (exitcode, str(self)))


duplicity.Error: non-zero exitcode (30) from backup command: duplicity --verbosity=5 --archive-dir=/var/cache/duplicity cleanup --force s3://s3.amazonaws.com/tklbam-us-east-1-67de5cff790f5ed2075d/7ee23lhbnjm*****

He has worked around it by clearing (actually he archived it, but there shouldn't be anything in there that needs to be kept) the Duplicity cache /var/cache/duplicity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment