Skip to content

Commit 931d372

Browse files
authored
Merge pull request #926 from reportportal/fix/restore-guide
2 parents 20e828c + aa8f6ba commit 931d372

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

docs/installation-steps-advanced/BackupRestoreGuide.md

+36-5
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,58 @@ Explanation:
3232
- `pg_dump -U $DB_USER -d $DB_NAME`: Initiates the PostgreSQL dump, specifying the username and database name.
3333
- `> reportportal_db_backup.sql`: Redirects the dump output to a file named `backup.sql`.
3434

35-
Make sure to replace placeholders like `DB_CONTAINER`, `DB_USER`, and `DB_NAME` with your actual container pod name, PostgreSQL username, and database name.
35+
Make sure to replace placeholders like `DB_CONTAINER`, `DB_USER`, and `DB_NAME` with your container pod name, PostgreSQL username, and database name.
3636

3737
### PostgreSQL Restore Process
3838

39-
To restore PostgreSQL database using following command:
39+
:::important
40+
Ensure that PostgreSQL is running as a standalone service before starting ReportPortal. Deploy ReportPortal only after the database has been successfully restored
41+
:::
42+
43+
#### 1. Deploy PostgreSQL as a Standalone Service
44+
45+
Start the PostgreSQL container using Docker Compose:
4046

4147
```bash
48+
docker compose up -d postgres
49+
```
50+
51+
> This brings up only the `postgres` service defined in your `docker-compose.yml`.
52+
53+
#### 2. Restore the PostgreSQL Database Backup
54+
55+
Set the required environment variables:
56+
57+
```bash
58+
DB_CONTAINER=postgres
4259
DB_USER=rpuser
4360
DB_NAME=reportportal
44-
DB_CONTAINER=postgres
61+
```
4562

63+
Restore the database from your backup file:
4664

65+
```bash
4766
docker exec -i $DB_CONTAINER psql -U $DB_USER -d $DB_NAME < reportportal_docker_db_backup.sql
4867
```
4968

69+
> Ensure the backup file `reportportal_docker_db_backup.sql` is in your current working directory.
70+
71+
#### 3. Deploy ReportPortal
72+
73+
Once the database is restored, bring up the full ReportPortal stack:
74+
75+
```bash
76+
docker compose up -d
77+
```
78+
79+
This command launches all remaining services, including all the ReportPortal services and components.
80+
5081
### Binary Storage Backup Process
5182

52-
The simple way to backup binary storage is back up the volume’s directory (by default path is /var/lib/docker/volumes/volume_hash).
83+
The simple way to back up binary storage is to back up the volume’s directory (by default, the path is /var/lib/docker/volumes/volume_hash).
5384

5485
:::important
55-
The following method available from ReportPortal version 24.1.
86+
The following method is available from ReportPortal version 24.1.
5687
:::
5788

5889
```bash

0 commit comments

Comments
 (0)