Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deployment/development/backup_and_restore_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ docker-compose up -d mongodb postgres neo4j
./init.sh backup_postgres
```
This creates `opengin.tar.gz` in your PostgreSQL backup directory.
Note: PostgreSQL backups are created using `pg_dump --clean --if-exists`. Restoring from these backups will drop and recreate objects contained in the dump. Treat restores as destructive operations and run them only against a dedicated development database; do not rely on them being fully idempotent if the target database contains additional objects.

3. **Backup Neo4j:**
```bash
Expand Down
2 changes: 1 addition & 1 deletion deployment/development/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ backup_postgres() {

# Run pg_dump and capture output
log "INFO" "Running pg_dump command..."
pg_dump_output=$(docker exec postgres pg_dump -U postgres -h localhost -d ${POSTGRES_DATABASE} -f "/var/lib/postgresql/backup/${backup_file}.sql" 2>&1)
pg_dump_output=$(docker exec postgres pg_dump -U "$POSTGRES_USER" -h localhost -d "$POSTGRES_DATABASE" --clean --if-exists -f "/var/lib/postgresql/backup/${backup_file}.sql" 2>&1)
pg_dump_exit_code=$?

log "INFO" "Pg_dump output: $pg_dump_output"
Expand Down
Loading