> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/ko/configuration/overleaf-toolkit/redis.md).

# Redis

### 비밀번호 인증 활성화

외부 Redis 서비스를 사용 중이며 비밀번호를 제공해야 하는 경우, 다음을 설정하여 이를 수행할 수 있습니다 `OVERLEAF_REDIS_PASS` 및 `REDIS_PASSWORD` 의 환경 변수를 **config/variables.env** 파일에 설정한 뒤 다음을 실행하여 `bin/up -d` 명령으로 다음을 다시 생성합니다 **sharelatex** 컨테이너.

로컬 Redis 인스턴스를 실행 중이라면, 다음을 구성해야 합니다: **redis** 서비스가 비밀번호 인증으로 시작되도록 해야 합니다. 위의 환경 변수를 설정한 후에는 다음 추가 단계도 완료해야 합니다:

다음을 생성합니다: **docker-compose.override.yml** 에서 파일을 **config/** 디렉터리에 다음 내용을 사용하여:

{% code title="config/docker-compose.override.yml" %}

```yaml
services:
    redis:
        명령: "redis-server --requirepass <YOUR-PASSWORD>"
```

{% endcode %}

{% hint style="warning" %}
AOF 지속성이 활성화되어 있다면, 다음을 추가해야 합니다: `--appendonly yes` 를 `명령`.
{% endhint %}

실행합니다 `bin/up -d` 컨테이너를 다시 생성합니다.

### Append-Only File 지속성 활성화

(원문: <https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/redis#enabling-append-only-file-persistence>)

Redis AOF(Append-Only File) 지속성은 서버가 수신한 모든 쓰기 작업을 기록하여 데이터 내구성을 보장하는 강력한 방법입니다. 시점별로 데이터 세트의 복사본을 만드는 RDB 스냅샷과 달리, AOF는 데이터에 가해진 모든 변경 사항의 완전한 기록을 유지합니다.

{% hint style="info" %}
RDB 비활성화는 선택 사항입니다. 일반적으로는 두 지속성 방법을 함께 사용하는 것이 권장됩니다. 운영 환경에서 변경을 적용하기 전에 AOF와 RDB를 함께 사용할 때의 장단점을 검토하세요.
{% endhint %}

Redis에서 AOF 지속성을 활성화하는 방법에 대해 자세히 알아보려면 여기에서 확인하세요: <https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/#how-i-can-switch-to-aof-if-im-currently-using-dumprdb-snapshotsarrow-up-right>

1. 업그레이드를 위한 유지보수 시간을 예약합니다.
2. 다음을 사용하여 인스턴스를 중지합니다 `bin/stop` 그리고 다음의 백업을 만듭니다 **config/** 및 **data/** 폴더.
3. 실행합니다 `bin/up` 인스턴스를 시작하려면
4. 다음 명령을 실행합니다 `docker exec -it redis sh`
5. 다음 명령을 실행합니다 `redis-cli` Redis 명령줄 인터페이스를 엽니다
6. redis-cli에서 다음 명령을 실행합니다 `config set appendonly yes`
7. 이제 AOF 다시 쓰기가 데이터 지속성을 완료할 때까지 기다려야 합니다. 이를 위해 다음을 입력하세요: `INFO persistence` 를 redis-cli에 입력하고 다음을 기다립니다 `aof_rewrite_in_progress` 및 `aof_rewrite_scheduled` 가 `0`, 그리고 다음을 확인합니다: `aof_last_bgrewrite_status` 가 `ok`.
8. 다음을 입력하여 redis-cli를 종료합니다 `exit` 그리고 Enter 키를 누릅니다
9. 다음을 입력하여 Redis 컨테이너를 종료합니다 `exit` 그리고 Enter 키를 누릅니다
10. 명령을 실행합니다 `ls ./data/redis` 그리고 다음을 볼 수 있는지 확인합니다 **appendonly.aof** 파일
11. 다음을 편집하여 **config/overleaf.rc** 파일을 확인하고 다음을 변경합니다 `REDIS_AOF_PERSISTENCE` 환경 변수를 다음 값에서 `false` 에서 `true`
12. 실행합니다 `bin/up -d` 로 변경한 다음 애플리케이션이 작동하는지 확인합니다(프로젝트 편집기와 기록 패널이 정상적으로 작동합니다).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/ko/configuration/overleaf-toolkit/redis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
