# Przygotowanie systemu Linux do backupu Oracle

#### Backup bazy danych Oracle polega na wygenerowaniu pliku database dump używając skryptów backupu a następnie zabezpieczaniu wygenerowanego pliku dump.

***

## Proces przygotowywania systemu Linux

{% hint style="warning" %}
**Agent Xopero ONE** wymaga dostępu narzędzi `rman` oraz `sqlplus`. Przed rozpoczęciem upewnij się, że te narzędzia są zainstalowane i dostępne.
{% endhint %}

{% stepper %}
{% step %}
Używając wiersza poleceń **Linux**, zaloguj się na konto używane do tworzenia backupu **bazy danych Oracle** i wykonaj następujące polecenia:

```bash
echo 'connect target /; quit' | rman
```

```bash
echo 'SELECT INSTANCE_NAME FROM V$INSTANCE;' | sqlplus / as sysdba
```

{% endstep %}

{% step %}
Jeśli te narzędzia są niedostępne (przykład poniżej), musisz skonfigurować **zmienne środowiskowe**.

<figure><img src="/files/7OPJBrDkFU04oKe6gqEG" alt=""><figcaption></figcaption></figure>

1. Edytuj plik `/home//.bash_profile` i **dodaj** następujące wpisy:

```bash
export ORACLE_SID=<database_ID>
```

```bash
export ORACLE_HOME=database_directory
```

{% hint style="info" %}
`database_directory` określa lokalizację bazy danych **Oracle**.
{% endhint %}

```bash
export PATH=$ORACLE_HOME/bin:$PATH
```

<figure><img src="/files/BY1V4oAJYPJ06dKUVGoA" alt="" width="563"><figcaption><p><em>Przykład poprawnie skonfigurowanych zmiennych środowiskowych.</em></p></figcaption></figure>

2. Teraz, po ponownym zalogowaniu, wykonanie następujących poleceń powinno zakończyć się pomyślnie.

```bash
echo 'connect target /; quit' | rman
```

```bash
echo 'SELECT INSTANCE_NAME FROM V$INSTANCE;' | sqlplus / as sysdba
```

<figure><img src="/files/wVEv5F1ZFhOuaQeKy8Hi" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Po wykonaniu tych czynności system **Linux** powinien być gotowy do tworzenia backupu **środowiska Oracle**.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: 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:

```
GET https://helpcenter.xopero.com/xopero-one-en/pl/kopia-zapasowa-i-przywracanie/stacje-robocze-i-serwery/backup-bazy-danych/przygotowanie-systemu-linux-do-backupu-oracle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
