Hi,

I am running tklbam backup in the local mode (no Amazon) like the following:

sudo tklbam-backup --address file:///mnt/dir/backup --disable-resume

When I don't use --disable-resume I get the message:

Implicit --resume: Detected a rerun of an aborted backup session
                   You can disable this with the --disable-resume option
 

Ultimately, I get the following error:

Traceback (most recent call last):
  File "/usr/bin/tklbam-backup", line 510, in <module>
    main()
  File "/usr/bin/tklbam-backup", line 443, in main
    opt_resume, True, dump_path if dump_path else "/")
  File "/usr/lib/tklbam/backup.py", line 218, in __init__
    saved_backup_conf = BackupConf.fromfile(extras_paths.backup_conf)
  File "/usr/lib/tklbam/backup.py", line 76, in fromfile
    d = simplejson.load(file(path))
  File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 448, in load
    use_decimal=use_decimal, **kw)
  File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 505, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
 

It doesn't make sense to me. The log file is empty, even when trying with --debug flags.

Any ideas?

Forum: 
Tags: 
Jeremy Davis's picture

So first up it would be good to understand which appliance you are using, it's version and the version of TKLBAM (and dependencies). You can get that info like so:

turnkey-version
apt-get update -qq && apt-cache policy tklbam*

If you don't have the most recent version of TKLBAM (or would like to make sure you have), then it's worth trying to update that first:

apt-get install tklbam

(That will tell you if it already has the latest version available for your version of TurnKey)

Also could you please share how you initialised TKLBAM. I assume that you used the '--solo' switch? Did you create a profile? Or did you use an empty one? (i.e. '--force-profile=empty'). If you used a profile, could you please also share that. Please also share what overrides that you have configured (if any).

Unfortunately the stack trace is not all that helpful (as you noted), but it's clearly choking on some info that it is expecting but not receiving ("Expecting value: line 1 column 1 (char 0)").

As for the issue where it's trying to resume a failed backup, that suggests that it has previously had a failed backup and is trying to complete that. Do you get the same error if you allow it to try to complete the previous backup?

FWIW, you could also try using the '--dump' switch and see if that makes any difference. I.e.:

tklbam-backup --dump=/mnt/dir/backup

Hi,

I already run the latest version of tklbam. The issue happened on two of my VM's, one lampp14.2 the other jenkins14.2

I managed to fix the issue by dumping an old backup, and taking the missing file. I restored that to the /TKLBAM location, and that made my backup work.

 

It looks like my machine froze during the backup process which caused the backup and configuration to become corrupt. 

Jeremy Davis's picture

Thanks for posting back with the additional info.

TBH, I'm surprised that it didn't work with the '--disable-resume' switch as that should have avoided the issue altogether?! I'm not really clear why that wasn't the case. There is obviously a bug somewhere...

I'm not 100% sure, but I suspect that if you had removed (or ideally temporarily moved - just in case) /TKLBAM, /var/cache/tklbam and /var/cache/duplicity then that might have also fixed it. If you hit this again, I'd be interested to hear if that works. I.e.:

mv /TKLBAM /TKLBAM.bak
mv /var/cache/tklbam /var/cache/tklbam.bak
mv /var/cache/duplicity /var/cache/duplicity.bak

Then re-run the backup command (without '--disable-resume'). It should recreate the backup from scratch.

Re there being no log, unfortunately, that is expected behaviour when running TKLBAM interactively (it only creates a log when running non-interactively). It's something that I would like to change, but I just haven't had the spare cycles to look into it.

Regardless, really glad to hear that you got it working.

Add new comment