Sequel-ace: Import connections from Sequel Pro?

Created on 2 Jul 2020  路  12Comments  路  Source: Sequel-Ace/Sequel-Ace

Hello!
Is it possible to import connections from Sequel Pro?
I have many connections.
It will takes all day to make it manually.
Thanks.

Most helpful comment

I quickly wrote up this small shell script that copies all Sequel Pro passwords from Keychain back to Keychain under Sequel Ace keys. It's not perfect, as you need to authorize each password seperately, and once more when Sequel Ace reads it for the first time, but it still beats looking them all up manually, especially if you have A LOT of connections like I have. You can copy your password to your clipboard once and paste it in every authorization dialog that pops up. You can also temporarily clear the keychain password (press cmd while clicking OK to force an empty password).

It assumes you store your Sequel Pro passwords in the "default" keychain.
Make a backup of your keychain just to be sure. Mine was located at ~/Library/Keychains/login.keychain-db

#!/bin/bash

results=$(security dump-keychain -r | grep "Sequel Pro" | sed -E -e 's/^.*"([^"]+)"$/\1/' | sort | uniq)
IFS=$'\n' read -r -d '' -a items < <(printf '%s\0' "$results")

for key in "${items[@]}"
    do
        newkey=$(echo "$key" | sed -E -e 's/Sequel Pro/Sequel Ace/')
        echo "Migrating: $key --> $newkey"
        account=$(sudo security find-generic-password -l "$key" | grep "acct\"<blob>" | sed -E -e 's/^.*"acct"<blob>="(.+)"$/\1/')
        pwd=$(sudo security find-generic-password -l "$key" -w)
        security add-generic-password -a "$account" -s "$newkey" -w "$pwd" -T "/Applications/Sequel Ace.app" -U
        echo "Done: $key --> $newkey"
done

All 12 comments

You should be able to! If you select all your connections in sequel pro, you can use the export option from the menu. Then in sequel Ace, there's an option near the bottom of the connections panel to import them.

Additionally, some users have had success with https://github.com/sequelpro/sequelpro/issues/3705#issuecomment-649007109

@lipatovroman I can confirm that the Sequel Pro export and Sequel Ace import steps works馃憣

Yes, it works. But passwords are lost.

Afaik that's expected, because exporting password wouldn't be safe.

Yup. Passwords are stored in keychain. No way to access those Sequel Pro saved from Sequel Ace (would be a huge security hole if you could)

I've exported and imported a few times between apps without issue.
Passwords are not imported and this looks to me to be normal, Sequel Pro had the same behaviour. We wouldn't want any "security hole" ;) as Jason points.

@lipatovroman if you really want, you can "remap" the Sequel Pro password from the stored Keychain passwords one-by-one. How?

  1. Open ~/Library/Application Support/Sequel Pro/Data/Favorites.plist in TextEdit
  2. Search for the Sequel Pro favorite item in Keychain
  3. Open the Keychain info
  4. Copy the integer (_In my example: 6540209920180776830_)
    Schermafbeelding 2020-07-03 om 20 11 12
    _PS. The password is shown a random UUID_
  5. Search for the same item based on name in your Favorites.plist
  6. Look up the <integer> property
  7. Change this property value with the value of step 4.
    diff <key>id</key> -<integer>3213229210326907530</integer> +<integer>6540209920180776830</integer>

Is it possible to add same tool in automatic mode in Sequel Ace?
I mean tool "Import Data from Sequel Pro" including passwords.

Is it possible to add same tool in automatic mode in Sequel Ace?

I mean tool "Import Data from Sequel Pro" including passwords.

It is not. Not without a new release of Sequel Pro which is improbable if not impossible.

I quickly wrote up this small shell script that copies all Sequel Pro passwords from Keychain back to Keychain under Sequel Ace keys. It's not perfect, as you need to authorize each password seperately, and once more when Sequel Ace reads it for the first time, but it still beats looking them all up manually, especially if you have A LOT of connections like I have. You can copy your password to your clipboard once and paste it in every authorization dialog that pops up. You can also temporarily clear the keychain password (press cmd while clicking OK to force an empty password).

It assumes you store your Sequel Pro passwords in the "default" keychain.
Make a backup of your keychain just to be sure. Mine was located at ~/Library/Keychains/login.keychain-db

#!/bin/bash

results=$(security dump-keychain -r | grep "Sequel Pro" | sed -E -e 's/^.*"([^"]+)"$/\1/' | sort | uniq)
IFS=$'\n' read -r -d '' -a items < <(printf '%s\0' "$results")

for key in "${items[@]}"
    do
        newkey=$(echo "$key" | sed -E -e 's/Sequel Pro/Sequel Ace/')
        echo "Migrating: $key --> $newkey"
        account=$(sudo security find-generic-password -l "$key" | grep "acct\"<blob>" | sed -E -e 's/^.*"acct"<blob>="(.+)"$/\1/')
        pwd=$(sudo security find-generic-password -l "$key" -w)
        security add-generic-password -a "$account" -s "$newkey" -w "$pwd" -T "/Applications/Sequel Ace.app" -U
        echo "Done: $key --> $newkey"
done

Nice idea @bartdecorte! Thanks for sharing this. I hope others can use it successfully. :clap:

Was this page helpful?
0 / 5 - 0 ratings