Databases Backup and Restore software.
1.3K
Free, open-source, and self-hosted solution for automated backup and restoration of your database instances.
Documentation • Demo • Installation • Report Bug • Request Feature
Portabase Agent is the agent service use with Portabase Server. This service is for backup/restore db instances. Portabase Server
You have 3 ways to install Portabase Agent:
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:
# Mount the DB config file
- ./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: true
Then run:
docker compose up -d
git clone https://github.com/Portabase/agent-portabase
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": "Test database 1",
"database": "devdb",
"type": "postgresql",
"username": "devuser",
"password": "changeme",
"port": 5432,
"host": "localhost",
"generatedId": "16678159-ff7e-4c97-8c83-0adeff214681"
},
{
"name": "Test database 2",
"database": "mariadb",
"type": "mysql",
"username": "mariadb",
"password": "changeme",
"port": 3306,
"host": "localhost",
"generatedId": "16678124-ff7e-4c97-8c83-0adeff214681"
}
]
}
Create a database.json file with your database information:
[[databases]]
name = "Test database 1"
database = "devdb"
type = "postgresql"
username = "devuser"
password = "changeme"
port = 5432
host = "localhost"
generatedId = "16678159-ff7e-4c97-8c83-0adeff214681"
[[databases]]
name = "Test database 1"
database = "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.
For generatedId, you will need to generate it yourself using the UUID V4 format
Using Docker
docker exec -i -e PGPASSWORD=<password> <container_name> psql -U <USER> -d <DATABASE> < ./scripts/seed.sql
Install the client cli before
mysql -h 127.0.0.1 -P <port> -u <username> -p<password> <database_name> < ./scripts/seed-mysql.sql
Contributions are welcome and appreciated! Here's how to get started:
git checkout -b features/your-feature
git commit -m "Add YourFeature"
git push origin features/your-feature
Distributed under the Apache License. See LICENSE.txt for more information.
Thanks to all contributors and the open-source community!
Give the project a ⭐ if you like it!
No tags have been pushed to this repository yet.