Menu

#96 2.6.1 backup of legacy installation doesn't work.

v2
open
nobody
None
5
2017-11-06
2017-10-16
No

I have decided to make a bug ticket related from a post update I made earlier in the discussion thread. I'm getting the following error when I am attempting to backup a current 2.4.5 installation for an upgrade to 2.6.1:

python setup.py -u -f /tmp/db_backup.xml
Traceback (most recent call last):
  File "setup.py", line 139, in <module>
    backup_legacy_db(dburi, options.datafile, host, username, password, db)
  File "setup.py", line 75, in backup_legacy_db
    converter.port_database(outfile)
  File "/opt/filelocker/lib/DBTools.py", line 244, in port_database
    cliKeys = self.GetAllCliKeys()
  File "/opt/filelocker/lib/DBTools.py", line 504, in GetAllCliKeys
    newKey = CLIKey(row['host_ipv4'], row['host_ipv6'], row['value'])
KeyError: 'host_ipv4'

In the 2.4.5 "core/dao/MySQLDAO.py" file:

            CREATE TABLE IF NOT EXISTS `cli_key` (
            `cli_key_user_id` varchar(30) NOT NULL,
            `cli_key_host_ipv4` varchar(15) NOT NULL,
            `cli_key_host_ipv6` varchar(39) NOT NULL,
            `cli_key_value` varchar(32) NOT NULL,
            PRIMARY KEY  (`cli_key_user_id`,`cli_key_host_ipv4`,`cli_key_host_ipv6`)

And in "lib/Models.py" for 2.6.1:

    __tablename__ = "cli_keys"
    user_id = Column(String(30), primary_key=True)
    host_ipv4 = Column(String(15), primary_key=True)
    host_ipv6 = Column(String(39), primary_key=True)
    value = Column(String(32))

Shouldn't these be matching values and what not? Or am I missinterpreting this in some way?

Discussion

  • David Hutchins

    David Hutchins - 2017-10-16

    Thanks for the details!!! The CLI code was mostly re-written in 2.6, so it operates a bit differently in the DB now. But this should be very helpful. Thanks!

     
  • Corey Shafer

    Corey Shafer - 2017-10-16

    You're welcome! I did a little more digging earlier today and it looks like those field names are used in other files throughout the application so I'm sure some of them will need to be updated accordingly, as well.

     
  • K.Schneider

    K.Schneider - 2017-11-06

    Is there going to be a fix for this issue? We're running into the same problem, same versions, upgrading from 2.4.5 to 2.6.1.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.