@bratislava/ristor
v1.0.1
Published
A tool for restoring Bratislava.sk PostgreSQL database dumps
Downloads
5
Keywords
Readme
@bratislava/ristor
@bratislava/ristor is a command-line tool for downloading and restoring PostgreSQL database dumps from Bratislava.sk Minio storage.
Installation
To install ristor globally, run:
npm install -g @bratislava/ristor@latest
Usage
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.
- 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.
Requirements
- PostgreSQL client (
psql
command should be available in your system PATH)
Configuration
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.
License
This project is licensed under the European Union Public Licence (EUPL) version 1.2 or later. See the LICENSE file for details.