You are here
I am attempting to use the tklbam-backup command with the --address switch as follows:
>tklbam-backup --address file:///<localdir-path>
Which ever way I try to use this the initial creation of the backup runs as normal but the duplicity phase fails with the following error:
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 234, in __call__
cleanup_command.run(target.secret, target.credentials)
File "/usr/lib/tklbam/duplicity.py", line 67, in run
if creds.type in ('devpay', 'iamuser'):
AttributeError: 'NoneType' object has no attribute 'type'
Running a backup to the hub is working fine, so I seem to have a working configuration otherwise.
This is running on an up to date debian 7 system with python version 2.7.3
Can you point me in the direction of what I'm doing wrong?
Thanks, DJ
I'm getting same error on a tklbam-restore
Restoring a backup from another machine onto a clean Redmine install.
root@redmine ~# tklbam-restore --keyfile=/root/backup/key --address=file:///root/backup
Passphrase:
Executing Duplicity to download file:///root/backup to /tmp/tklbam-PbQyop
==========================================================================
// started squid: caching downloaded backup archives to /var/cache/tklbam/restore
# duplicity --archive-dir=/var/cache/duplicity --s3-unencrypted-connection file:///root/backup /tmp/tklbam-PbQyop
Traceback (most recent call last):
File "/usr/bin/tklbam-restore", line 553, in <module>
main()
File "/usr/bin/tklbam-restore", line 491, in main
backup_extract_path = get_backup_extract()
File "/usr/bin/tklbam-restore", line 463, in get_backup_extract
downloader(raw_download_path, target, log=_print if not silent else None, debug=opt_debug, force=opt_force)
File "/usr/lib/tklbam/duplicity.py", line 179, in __call__
command.run(target.secret, target.credentials, debug=debug)
File "/usr/lib/tklbam/duplicity.py", line 67, in run
if creds.type in ('devpay', 'iamuser'):
AttributeError: 'NoneType' object has no attribute 'type'
Digging into the source.
I think I found an issue with /usr/lib/tklbam/duplicity.py
Checking if creds was non-None helped me get past the error. The function definition allows for creds to default to None so I think it's valid for creds to be None.
I'm just posting in the hope it would be useful for a tklbam developer. Do not trust my code, please.
My diff is getting blocked by the spam filter. Trying simple code list.
/usr/lib/tklbam/duplicity.py (line numbers on left)
64 def run(self, passphrase, creds=None, debug=False):
67 if creds and creds.type in ('devpay', 'iamuser'):
75 elif creds and creds.type == 'iamrole':
Working on a fix
Tested and committed a fix
I pushed a fix to GitHub. Alon will update the repository tomorrow morning.
Package archive updated
Package archive repository updated with latest tklbam version.
Add new comment