Free, open-source, and self-hosted solution for automated backup and restoration of your database instances.
Documentation β’ Demo β’ Installation β’ Contributing β’ Report Bug β’ Request Feature
Portabase Agent is the agent service use with Portabase Server. This service is for backup/restore db instances. Portabase Server
Ensure Docker is installed on your machine before getting started.
Create a docker-compose.yml file with the following configuration:
name: agent-portabase
services:
app:
container_name: agent-portabase
restart: always
image: solucetechnologies/agent-portabase:latest
volumes:
- ./databases.json:/app/src/data/config/config.json
# - ./databases.toml:/app/src/data/config/config.toml
environment:
TZ: "Europe/Paris"
# DATABASES_CONFIG_FILE: "config.toml" if you use .toml config file. By default, it's "config.json"
EDGE_KEY: "<Get your edge key from your dashboard>"
networks:
- portabase
db:
image: postgres:17-alpine
networks:
- portabase
- default
ports:
- "5430:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=<your_database>
- POSTGRES_USER=<database_user>
- POSTGRES_PASSWORD=<database_password>
volumes:
postgres-data:
networks:
portabase:
name: portabase_network
external: trueThen run:
docker compose up -d- Clone the repository
git clone https://github.com/Soluce-Technologies/agent-portabase
- Start the project
docker compose up
You can configure your database connections by adding a config file. The software supports both JSON and TOML formats, so you can choose the format that best fits your workflow.
Multiple databases can be connected through the same agent, which is useful for managing development, staging, and production environments.
Create a database.json file with your database information:
{
"databases": [
{
"name": "devdb",
"type": "postgresql",
"username": "devuser",
"password": "changeme",
"port": 5432,
"host": "localhost",
"generatedId": "16678159-ff7e-4c97-8c83-0adeff214681"
},
{
"name": "mariadb",
"type": "mysql",
"username": "mariadb",
"password": "changeme",
"port": 3306,
"host": "localhost",
"generatedId": "16678124-ff7e-4c97-8c83-0adeff214681"
}
]
}For generatedId, you will need to generate it yourself using the UUID V4 format
Create a database.json file with your database information:
[[databases]]
name = "devdb"
type = "postgresql"
username = "devuser"
password = "changeme"
port = 5432
host = "localhost"
generatedId = "16678159-ff7e-4c97-8c83-0adeff214681"
[[databases]]
name = "mariadb"
type = "mysql"
username = "mariadb"
password = "changeme"
port = 3306
host = "localhost"
generatedId = "16678124-ff7e-4c97-8c83-0adeff214681"β Both JSON and TOML formats are fully supported.
- Add Changelog
- Add tests procedure
- Add Release File
- Security improvements
- Multi db support
- PostgreSQL
- MySQL
- MariaDB
- MongoDB
See the open issues for a full list of proposed features (and known issues).
Using Docker
docker exec -i -e PGPASSWORD=<password> <container_name> psql -U <USER> -d <DATABASE> < ./scripts/seed.sqlInstall the client cli before
mysql -h 127.0.0.1 -P <port> -u <username> -p<password> <database_name> < ./scripts/seed-mysql.sqlContributions are welcome and appreciated! Here's how to get started:
- Fork the repository
- Create a new branch:
git checkout -b feature/YourFeature
- Commit your changes:
git commit -m "Add YourFeature" - Push to the branch:
git push origin feature/YourFeature
- Open a pull request
Give the project a β if you like it!
Use the following format for Docker image versioning:
major.minor.patch-rc.release
# Example: 1.0.0-rc.1
major.minor.patch-rc.release-tag
# Example: 1.0.0-rc.1-devDistributed under the Apache License. See LICENSE.txt for more information.
- Killian Larcher - killian.larcher@soluce-technologies.com
- Charles Gauthereau - charles.gauthereau@soluce-technologies.com
- Project Link: https://github.com/Soluce-Technologies/agent-portabase
Thanks to all contributors and the open-source community!