Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6I7c-0006Of-Pf for pgsql-admin@arkaria.postgresql.org; Sun, 31 Jan 2021 19:10:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l6I7Z-0001Wl-C9 for pgsql-admin@arkaria.postgresql.org; Sun, 31 Jan 2021 19:10:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6I7Z-0001Wd-06 for pgsql-admin@lists.postgresql.org; Sun, 31 Jan 2021 19:10:53 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6I7P-0004KB-8E for pgsql-admin@lists.postgresql.org; Sun, 31 Jan 2021 19:10:49 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id 6497438020A; Sun, 31 Jan 2021 20:10:40 +0100 (CET) Received: from rs.plausibolo.de ([127.0.0.1]) by localhost (h2367442.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oyiGlyQMmSbD; Sun, 31 Jan 2021 20:10:40 +0100 (CET) Received: from [192.168.178.86] (p5b24967a.dip0.t-ipconnect.de [91.36.150.122]) by rs.plausibolo.de (Postfix) with ESMTPSA id 1BF9B3800FC; Sun, 31 Jan 2021 20:10:40 +0100 (CET) Subject: Re: Little help with the server export function To: pgsql-admin@lists.postgresql.org References: From: Holger Jakobs Message-ID: <5cad8aa8-7929-1262-0ec7-c83e1f638c6d@jakobs.com> Date: Sun, 31 Jan 2021 20:10:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="E5kIdtcNzXh95KLjKLmJPFQuUn5ze8ZjM" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --E5kIdtcNzXh95KLjKLmJPFQuUn5ze8ZjM Content-Type: multipart/mixed; boundary="btUf97RmHP9FWwcXJYLYXIzDtLXjF6zt3"; protected-headers="v1" From: Holger Jakobs To: pgsql-admin@lists.postgresql.org Message-ID: <5cad8aa8-7929-1262-0ec7-c83e1f638c6d@jakobs.com> Subject: Re: Little help with the server export function References: In-Reply-To: --btUf97RmHP9FWwcXJYLYXIzDtLXjF6zt3 Content-Type: multipart/alternative; boundary="------------FB59AEF4CBCDF106ECBAC493" Content-Language: de-DE This is a multi-part message in MIME format. --------------FB59AEF4CBCDF106ECBAC493 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Am 31.01.21 um 17:48 schrieb Ted Gulesserian: > Consulted these links: > > https://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html= #importing-servers=20 > > > https://stackoverflow.com/questions/47718815/import-server-list-between= -pgadmin-4=20 > > > https://packaging.python.org/guides/installing-using-pip-and-virtual-en= vironments/=20 > > > And tried variations of it, but I can't seem to get it to work. > > For example the cygwin bash script provided below results in the=20 > following error. > > ---------- > Dumping servers with: > User: pgadmin4@pgadmin.org > SQLite pgAdmin config: pgadmin4.db > ---------- > Specified SQLite database file is not valid. > > I tried using the venv but looks like a version of Python installed by = > Windows 10 is taking precedence even when I issues=20 > ./Script/activate.bat in the pgadmin venv folder. > > Any help will be much appreciated. > > Thanks, > Ted > > export DIR=3D"$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 = > && pwd )" > echo Sctipt located in $DIR > export winhome=3D$(cmd.exe /C echo c:%HOMEPATH%) > export winhome=3D${winhome::-1} > export pgAdminHome=3D$winhome\\AppData\\Roaming\\pgAdmin > export cygPgAdminHome=3D$(cygpath ${pgAdminHome}) > export setupPath=3D$(cygpath -w "/cygdrive/c/Program Files/pgAdmin=20 > 4/v4/web/setup.py") > echo $cygPgAdminHome > cd $cygPgAdminHome > installcommand=3D"cmd /r pip install flask flask_babelex flask_login=20 > flask_mail flask_paranoid flask_security email_validator=20 > flask_sqlalchemy flask_migrate simplejson" > echo $installcommand > eval $installcommand > pycommand=3D"cmd /r python '$setupPath' --sqlite-path 'pgadmin4.db'=20 > --dump-servers pgadmin_bookmarks.json" > echo $pycommand > eval $pycommand > cp pgadmin_bookmarks.json $DIR/pgadmin_bookmarks.json None of these questions are related to this mailing list about=20 postgresql server. Better try on a pgadmin4 mailing list. --=20 Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 --------------FB59AEF4CBCDF106ECBAC493 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


Am 31.01.21 um 17:48 schrieb Ted Gulesserian:
Consulted these links:=C2=A0




And tried variations of it, but I can't seem to get it to work.=C2=A0

For example the cygwin bash script provided below results in the following error.=C2=A0

----------
Dumping servers with:
User: pgadmin4@pgadmin.org
SQLite pgAdmin config: pgadmin4.db
----------
Specified SQLite database file is not valid.

I tried using the venv but looks like a version of Python installed by Windows 10 is taking precedence even when I issues ./Script/activate.bat in the pgadmin venv folder.=C2=A0=C2= =A0

Any help will be much appreciated.=C2=A0

Thanks,=C2=A0
Ted

export DIR=3D"$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo Sctipt located in $DIR
export winhome=3D$(cmd.exe /C echo c:%HOMEPATH%)
export winhome=3D${winhome::-1}
export pgAdminHome=3D$winhome\\AppData\\Roaming\\pgAdmin
export cygPgAdminHome=3D$(cygpath ${pgAdminHome})
export setupPath=3D$(cygpath -w "/cygdrive/c/Program Files/pgAdmin 4/v4/web/setup.py")
echo $cygPgAdminHome
cd $cygPgAdminHome
installcommand=3D"cmd /r pip install flask flask_babelex flask_login flask_mail flask_paranoid flask_security email_validator flask_sqlalchemy flask_migrate simplejson"
echo $installcommand
eval $installcommand
pycommand=3D"cmd /r python '$setupPath' --sqlite-path 'pgadmin4.db' --dump-servers pgadmin_bookmarks.json"
echo $pycommand
eval $pycommand
cp pgadmin_bookmarks.json $DIR/pgadmin_bookmarks.json


None of these questions are related to this mailing list about postgresql server.

Better try on a pgadmin4 mailing list.


--=20
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
--------------FB59AEF4CBCDF106ECBAC493-- --btUf97RmHP9FWwcXJYLYXIzDtLXjF6zt3-- --E5kIdtcNzXh95KLjKLmJPFQuUn5ze8ZjM Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQScuJCxWJK1p5BOebGKV5yTsxlhugUCYBcArwUDAAAAAAAKCRCKV5yTsxlhulsc AKCE8tDqZXNE3dSKmjFMwa/3A0uVFACfUDmtee5RkjEYh3WjoLEc0UMrDQY= =dZKY -----END PGP SIGNATURE----- --E5kIdtcNzXh95KLjKLmJPFQuUn5ze8ZjM--