@bratislava/ristor is a command-line tool for downloading and restoring PostgreSQL database dumps from Bratislava.sk Minio storage.
To install ristor globally, run:
npm install -g @bratislava/ristor@latest
After installation, you can run the tool using the ristor
command:
ristor
The tool will guide you through the following steps:
- Enter the Minio sharable download URL for the SQL dump file.
- Optionally, enter the browser URL to get the project information.
- Provide database connection details (host, port, database name, username, and password).
The tool will then:
- Download the SQL dump file.
- Terminate existing connections to the specified database.
- Restore the SQL dump to the specified database.
- Clean up the temporary files.
- PostgreSQL client (
psql
command should be available in your system PATH)
The tool uses default database configurations based on the project path in the Minio URL. You can modify these defaults in the defaults.js
file.
This project is licensed under the European Union Public Licence (EUPL) version 1.2 or later. See the LICENSE file for details.