pykeepass
pykeepass copied to clipboard
Copying entries from one KeePassDB to another
Morning!
I'm trying to copy entries from one KeePassDB to another. I don't want to add these entries with the kp.add()
method since that would change the Last time edited info and change the uuid.
I found no way to do this with methods provided by the library, so what I did is:
old_db_group._element.append(new_db_entry._element)
old_db.save()
Is this a safe solution? Is there another provided by pykeepass?
PS: My end goal is to write a merge/sync routine. That overwrites older entries and adds entries that did only exist in one DB to the other. A method like kp0.merge(kp1 :: PyKeePass, overwrite_older :: bool)
could also be a useful enhancement.
Thank's in advance,
Jakob