TurnKey Linux Virtual Appliance Library

Can't use tklbam-backup after associating with new API Key through tklbam-init --force

I can't use tklbam-backup after associating with new API Key through tklbam-init --force, it gives me the following error:

root@prestashop ~# tklbam-backup
Traceback (most recent call last):
  File "/usr/bin/tklbam-backup", line 266, in <module>
    main()
  File "/usr/bin/tklbam-backup", line 233, in main
    get_server_id())
  File "/usr/lib/tklbam/hub.py", line 226, in new_backup_record
    response = self._api('POST', 'record/create/', attrs)
  File "/usr/lib/tklbam/hub.py", line 183, in _api
    return API.request(method, self.API_URL + uri, attrs, headers)
  File "/usr/lib/tklbam/hub.py", line 127, in request
    raise Error(c.response_code, name, description)
hub.Error: (400, 'BackupRecord.ServerIDNotFound', 'Server ID does not exist: <removed-this-incase-its-important>')
 

Basicly what i wanted to do is backup one of my running instance to someone else's hub backup store.

used tklbam-init --force to feed the other Persons API Key (no error shown)

 

possible that there is something in tklbam-init that is broken? it seems it doesn't set the proper target URL for the s3 backup.

Help would be much appreciated! thank you!!

Liraz Siri's picture

This is a Hub bug

The Hub shouldn't prevent you from backing up your instance just because it can't find the server ID. I'll ask Alon to take a look at this. In the meantime, you can just delete the server id on your server:
rm -f /var/lib/hubclient/server.conf

one thing i was able to do

one thing i was able to do was associating my HUB API ID with the other one's server and did a tklbam-restore on it. that worked! after that i set the API ID back to the new Hub Account and also Backup works now.

so to sum it up; restore from other hub api = yes, back to other hub api = no (haven't tried deleting that server.conf yet)

 

thanks for your reply! much appreciated!


Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)