title: Export connections in pgadmin4
body: <p>How can I export connections in pgadmin4?</p>
  
  <p>I intend to us <a href="https://hub.docker.com/r/dpage/pgadmin4/" rel="nofollow noreferrer">pgadmin in docker</a> and I want to map the servers.json as suggested. So I thought to simply export my connections in a local pgadmin4 and map them.</p>
  
  <p>I found an <a href="https://www.pgadmin.org/docs/pgadmin4/dev/export_import_servers.html" rel="nofollow noreferrer">explanation</a> to export servers. Unfortunately this does not work. I tried ubuntu 18.04 LTS and Windows 10 Pro but I always end up with error messages. Here is the message I retrieve in ubuntu:</p>
  
  <pre><code>$ python3 /usr/share/pgadmin4/web/setup.py --dump-servers output_file.json
  Traceback (most recent call last):
    File "/usr/share/pgadmin4/web/setup.py", line 406, in &lt;module&gt;
      dump_servers(args)
    File "/usr/share/pgadmin4/web/setup.py", line 63, in dump_servers
      app = create_app()
    File "/usr/share/pgadmin4/web/pgadmin/__init__.py", line 229, in create_app
      create_app_data_directory(config)
    File "/usr/share/pgadmin4/web/pgadmin/setup/data_directory.py", line 29, in create_app_data_directory
      _create_directory_if_not_exists(config.SESSION_DB_PATH)
    File "/usr/share/pgadmin4/web/pgadmin/setup/data_directory.py", line 15, in _create_directory_if_not_exists
      os.mkdir(_path)
  FileNotFoundError: [Errno 2] No such file or directory: '/var/cache/pgadmin/sessions'
  </code></pre>
  
  <p>This seems logical, since there is no such file. But how can I export my server settings and share them via servers.json?</p>