# Preparing Linux to backup Oracle

#### Oracle database backup involves generating a database dump using backup scripts and then backing up the resulting dump file.

***

## Linux preparation process

{% hint style="warning" %}
**Xopero ONE agent** requires the availability of the `rman` and `sqlplus` tools. Before starting, ensure that these tools are installed and accessible.
{% endhint %}

{% stepper %}
{% step %}
Using the **Linux** command line, log in to the account used for backing up your **Oracle** database and execute the following commands:

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

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

{% endstep %}

{% step %}
If these tools are unavailable (example below) you need to configure the environment variables.

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

1. Edit the `/home//.bash_profile` file and add the following records:

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

```bash
export ORACLE_HOME=database_directory
```

{% hint style="warning" %}
The `database_directory` specifies the location of the **Oracle** database.
{% endhint %}

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

<figure><img src="/files/BY1V4oAJYPJ06dKUVGoA" alt="" width="563"><figcaption><p><em>Example of correctly configured environment variables.</em></p></figcaption></figure>

2. Now, after logging in again, executing the following commands should complete successfully.

```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 %}
Once done, your **Linux** system should now be ready to backup an **Oracle** environment.
{% 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/backup-and-recovery/workstations-and-servers/database-backup/preparing-linux-to-backup-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.
