Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/smoke_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
name: Create backup
run: |
mkdir ${PWD}/backup
docker compose run --rm -v ${PWD}/backup:/backup:rw --entrypoint "bash /app/openrag/scripts/entrypoint-backup.sh simplewiki-500" openrag-cpu
docker compose --env-file .env run --rm -v ${PWD}/backup:/backup:rw --entrypoint "bash /app/openrag/scripts/entrypoint-backup.sh simplewiki-500" openrag-cpu
wc -l backup/simplewiki-500.openrag

-
Expand All @@ -107,12 +107,12 @@ jobs:
-
name: Restore from modified backup
run: |
docker compose run --rm -v ${PWD}/backup:/backup:ro --entrypoint "bash /app/openrag/scripts/entrypoint-restore.sh simplewiki-500-2 /backup/tmp.openrag" openrag-cpu
docker compose --env-file .env run --rm -v ${PWD}/backup:/backup:ro --entrypoint "bash /app/openrag/scripts/entrypoint-restore.sh simplewiki-500-2 /backup/tmp.openrag" openrag-cpu

-
name: Create backup again
run: |
docker compose run --rm -v ${PWD}/backup:/backup:rw --entrypoint "bash /app/openrag/scripts/entrypoint-backup.sh simplewiki-500-2" openrag-cpu
docker compose --env-file .env run --rm -v ${PWD}/backup:/backup:rw --entrypoint "bash /app/openrag/scripts/entrypoint-backup.sh simplewiki-500-2" openrag-cpu
wc -l backup/simplewiki-500-2.openrag

-
Expand Down
14 changes: 8 additions & 6 deletions docs/content/docs/documentation/backup_restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It's better to stop `openrag-cpu` (or `openrag`) service before starting backup.
:::

```bash
docker compose \
docker compose --env-file .env \
run \
--build \
--rm \
Expand All @@ -23,7 +23,7 @@ docker compose \
:::info
By default backup script creates plan text uncomressed file. To make things faster you can use multithread compressor the following way:
```bash
docker compose \
docker compose --env-file .env \
run \
--build \
--rm \
Expand All @@ -37,7 +37,8 @@ docker compose \
## Backup all partitions

```bash
docker compose run --build --rm \
docker compose --env-file .env \
run --build --rm \
-v ~/backup:/backup:rw \
--entrypoint "uv run /app/openrag/scripts/backup.py -o /backup/test.openrag" \
openrag
Expand All @@ -51,7 +52,7 @@ docker compose run --build --rm \
Start with dry run to ensure the backup file is correct:

```bash
docker compose \
docker compose --env-file .env \
run \
--build \
--rm \
Expand All @@ -62,7 +63,7 @@ docker compose \
Backup files are expected to be in `/my-backup-dir/`. If the dry run is successful, run the following script to insert the data :

```bash
docker compose \
docker compose --env-file .env \
run \
--build \
--rm \
Expand All @@ -74,7 +75,8 @@ docker compose \
## Restore all partitions

```bash
docker compose run --build --rm \
docker compose --env-file .env \
run --build --rm \
-v ~/backup:/backup:rw \
--entrypoint "uv run /app/openrag/scripts/restore.py /backup/test.openrag"\
openrag
Expand Down
2 changes: 1 addition & 1 deletion openrag/scripts/backup.sh.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
OUTPUT_DIR=$1
PARTITION_NAME=$2

docker compose \
docker compose --env-file .env \
run \
--build \
--rm \
Expand Down
2 changes: 1 addition & 1 deletion openrag/scripts/restore.sh.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BACKUP_DIR=$1
BACKUP_FILE=$2
PARTITION_NAME=$3

docker compose \
docker compose --env-file .env \
run \
--build \
--rm \
Expand Down