Fixed an issue when dumping servers from a desktop pgAdmin app by providing an option '--sqlite-path'. Fixes #5521

This commit is contained in:
Aditya Toshniwal
2020-06-01 11:22:38 +05:30
committed by Akshay Joshi
parent b21b03495d
commit 1050c9857a
4 changed files with 110 additions and 44 deletions

View File

@@ -23,7 +23,11 @@ the ``--dump-servers`` command line option, followed by the name (and if require
path) to the desired output file. By default, servers owned by the desktop mode
user will be dumped (pgadmin4@pgadmin.org by default - see the DESKTOP_USER
setting in ``config.py``). This can be overridden with the ``--user`` command
line option. For example:
line option. There can be multiple configuations of pgAdmin on the same system.
To dump the servers from specific pgAdmin config DB file, ``--sqlite-path`` option
can be used. It is also recommended to use this option when running pgAdmin in
desktop mode. By default SQLITE_PATH setting in ``config.py`` is taken.
For example:
.. code-block:: bash
@@ -33,6 +37,10 @@ line option. For example:
/path/to/python /path/to/setup.py --dump-servers output_file.json --user user@example.com
# to specify a pgAdmin config DB file:
/path/to/python /path/to/setup.py --dump-servers output_file.json --sqlite-path /path/to/pgadmin4.db
To export only certain servers, use the ``--servers`` option and list one or
more server IDs. For example:
@@ -48,7 +56,10 @@ the ``--load-servers`` command line option, followed by the name (and if require
path) of the JSON file containing the server definitions. Servers will be owned
by the desktop mode user (pgadmin4@pgadmin.org by default - see the DESKTOP_USER
setting in ``config.py``). This can be overridden with the ``--user`` command
line option. For example:
line option. There can be multiple configuations of pgAdmin on the same system.
To load the servers into a specific pgAdmin config DB file, ``--sqlite-path`` option
can be used. It is also recommended to use this option when running pgAdmin in
desktop mode. By default SQLITE_PATH setting in ``config.py`` is taken. For example:
.. code-block:: bash
@@ -58,6 +69,10 @@ line option. For example:
/path/to/python /path/to/setup.py --load-servers input_file.json --user user@example.com
# to specify a pgAdmin config DB file:
/path/to/python /path/to/setup.py --load-servers input_file.json --sqlite-path /path/to/pgadmin4.db
If any Servers are defined with a Server Group that is not already present in
the configuration database, the required Group will be created.

View File

@@ -19,4 +19,5 @@ Bug fixes
| `Issue #5416 <https://redmine.postgresql.org/issues/5416>`_ - Ensure that the query tool panel gets closed when clicking on the 'Don't Save' button.
| `Issue #5465 <https://redmine.postgresql.org/issues/5465>`_ - Fixed an issue where the Edge browser version is showing wrong and warning message gets displayed.
| `Issue #5521 <https://redmine.postgresql.org/issues/5521>`_ - Fixed an issue when dumping servers from a desktop pgAdmin app by providing an option '--sqlite-path'.
| `Issue #5539 <https://redmine.postgresql.org/issues/5539>`_ - Fixed typo in exception keyword.