Backup oracle on linux

Symantec Backup Exec: резервное копирование Oracle, установленного на Linux

Backup Exec – надежная система резервного копирования, корпоративного уровня. Установка и настройка этого продукта уже была описана ранее на хабре, сложностей никаких нет все просто и интуитивно понятно. Большим плюсом этого средства резервного копирования является, то что эта программа может бэкапить практически все ПО используемое на предприятии, перечислим основные возможности копирования:
• Способно копировать Windows, Linux, Macintosh;
• VMWare и ESX
• Домены Active Directory
• Состояние системы (System state)
• Фермы Microsoft Sharepoint
• Microsoft Exchange
• Базы данных MSSQL и Oracle, также Oracle Real Application Clusters
• Пользовательские ресурсы
• И многое другое.
Это всего не большой список возможности, преимущество в том, что одним продуктом можно заменить несколько утилит и наблюдать все бэкапы в одном месте или получать сообщения о сбоях.
Управление продуктом интуитивно понятно, но есть нюансы, в частности настройки бэкапа и восстановления Oracle, установленного на Linux, тут придётся изучить документацию, что бы разобраться. Постараюсь рассказать самые основные проблемы с которыми можно столкнуться и как их обойти во время резервного копирования Oracle, установленного на Linux.
Для начала необходимо установить клиента на Linux сервер. Обычный способ меню «Сервис –Установить агенты на другие сервера» c linux не всегда работает. Поэтому будем ставить вручную: в дистрибутиве BE имеется архив RALUS_RMALS_RAMS-xxxx.tar.gz в каталоге LinuxUnixMac. Копируем его на Linux сервер, распаковываем и запускам (установка и настройка выполняется под root):

tar –xzvf RALUS_RMALS_RAMS-xxxx.tar.gz cd RALUS_RMALS_RAMS-xxxx ./installralus

Отвечаем утвердительно на все вопросы и указываем IP сервера, где установлен сам Backup Exec. Во время установки предложит создать группу beoper. Добавьте сразу в эту группу пользователя от которого работает Oracle на linux. После этого необходимо настроить агента для работы с Oracle:

cd /opt/VRTSralus/bin/ ./AgentConfig Symantec Backup Exec Remote Agent Utility Choose one of the following options: 1. Configure database access 2. Configure Oracle instance information 3. Quit Please enter your selection: 1 Configuring machine information Choose one of the following options: 1. Add system credentials for Oracle operations 2. Edit system credentials used for Oracle operations 3. Remove system credentials used for Oracle operations 4. View system credentials used for Oracle operations 5. Quit Please enter your selection: 1 Enter a user name that has local system credentials: Enter the password: Re-enter password: Validating credentials. Do you want to use the full computer name/IP address for Oracle operations? (Y/N):Y Enter the full computer name or IP address: Do you want to use a custom port to connect to the media server during Oracle operations? (Y/N): N Commit Oracle operation settings to the configuration file? (Y/N): Y SUCCESS: Successfully added the entry to the configuration file. Configuring the Oracle Agent Choose one of the following options: 1. Add a new Oracle instance to protect 2. Edit an existing Oracle instance 3. Delete an existing Oracle instance 4. View Oracle instance entries that have been added in the Remote Agent Utility 5. Quit Please enter your selection: 1 Select an Oracle instance to configure Entry 1. Enter the number 0 to go back Enter your selection: 1 Enter the Oracle database SYSDBA user name: Enter the Oracle database SYSDBA password: Re-enter password: Validating credentials. Enter the media server name or IP address: Do you use a recovery catalog? (Y/N):N Do you want to use a customized job template? (Y/N): N Commit Oracle operation settings to the configuration file? (Y/N): Y SUCCESS: Successfully added the entry to the configuration file. 

Во время настройки клиента BE, сервер БД Oracle должен быть запущен. Если возникнет проблема:

oracle: error while loading shared libraries: libhasgen10.so: cannot open shared object file: No such file or directory Failed to login. 

То перед запуском конфигурации клиента необходимо установить переменные окружения для Oracle. Если вы столкнулись с такой проблемой, то и при запуске службы в дальнейшем потребуется устанавливать переменные.

--->>> No Oracle instances were discovered. Do you want to enter one? (Y/N):Y Enter the Oracle instance: SM1 --->>> The entry could not be validated. Ensure that the instance is configured correctly. 

Такое сообщение может возникать, если у Вас отсутствует файл oratab, проверьте права на него и его содержимое (SID и путь к ORACLE_HOME).
Установка и настройка клиента завершена, перезапускаем службу и переходим на сторону сервера BE.

/etc/init.d/VRTSralus.init restart

Обратите внимание, чтобы настроить резервное копирование необходимо, чтобы БД Oracle была в режиме архивирования, проверяем так:

SQL> select log_mode from sys.v$database; LOG_MODE ------------ NOARCHIVELOG ---- не подходит исправляем SQL> shu immediate SQL> startup mount SQL> alter database archivelog; SQL> alter database open; 

На серверной стороне Backup Exec сразу выполняем такие действий (поможет избежать множества проблем при подключении):

Меню > Сервис > Параметры > Oracle > Изменить список > Создать (Указать имя сервера, где установлен Oracle и пользователя под, которым запускается БД).

Далее все банально, Меню > Файл > Создать > Задание резервного копирования.

Когда необходимо настроить горячий бэкап Oracle Database — то не нужно копировать базу (файлы БД) как папку.

Если ранее все было выполнено правильно, то в разделе Серверы Linux/Unix появится имя вашего сервера БД, нажимая на + возле [ROOT] у Вас запросит учетные данные, нажимая создать, укажите учетные данные пользователя Linux под которым запущена БД. На + База данных Oracle, необходимо также нажать кнопку создать и указать данные пользователя БД, а именно пользователя sys, который был указан клиенту и у которого есть полномочия sysdba. Теперь мы можем выбирать каталог для сохранения ORACLE_HOME (уберите галку на папке с файлами БД, выполнять бэкап этих файлов можно, когда БД остановлена), и установите флажок напротив «База данных oracle» (для «гарячего» копирования). Пройдитесь по вкладкам, все достаточно понятно. На вкладке Oracle рекомендую установить флажок «Удалить скопированные файлы журнала» — это будет означать, что после копирования архивлогов на сервер бэкапа они будут удалены с сервера БД, иначе у Вас может закончится место на диске БД, и придется удалять журналы в ручную. Настраиваем копирование на диск или на ленту на вкладке «Устройства и носители», Устанавливаем расписание – нажимаем «Выполнить немедленно» — будет сформирован общий список установленных вами параметров, проверяем нажимаем ОК и наблюдаем выполнение в разделе «Монитор заданий».

Читайте также:  Log file systems linux

Если Ваша БД Oracle большая и часто используемая, то лучше сделать дополнительное задание для копирования только архивных журналов, таким образом снизится время потери информации и место на диске с БД будет чаше очищаться.

Источник

Oracle Backup

You can use Veeam Agent for Linux to create transactionally consistent backups of Veeam Agent machines that run the Oracle database system.

You can use Veeam Explorer for Oracle to restore Oracle databases from a Veeam Agent for Linux backup. For information about item-level recovery of Oracle systems, see Veeam Explorers User Guide .

How Oracle Processing Works

To ensure that the backed-up data is in the consistent state, Veeam Agent for Linux performs the Oracle database system processing using an internal component: oralib . To process the database system, Veeam Agent performs the following operations:

  1. When the backup job starts, Veeam Agent obtains information about Oracle databases that run on the Veeam Agent machine.
  2. Veeam Agent connects to the Oracle database and operates depending on the database state and mode:
  • Shutdown state
  • Backup state
  • Running database in ARCHIVELOG mode
  • Running database in NOARCHIVELOG mode

After Veeam Agent for Linux finishes database system processing, Veeam Agent proceeds to the next step of the backup process. To learn more, see How Backup Works .

If the Oracle database is shut down, Veeam Agent skips it and tries to connect to the next Oracle database if there are multiple database instances on the machine. The skipped Oracle database will be included in the backup. To restore such database, you must restore the entire volume that contains the database. You cannot restore the Oracle database as an independent item using Veeam Explorer for Oracle. To learn more, see Veeam Explorers User Guide .

Читайте также:  Настройка файлового сервера линукс

Veeam Agent displays a warning message about the database that is shut down in the job session logs. The backup job does not fail.

If the database is in the backup state, depending on the selected Oracle Processing option, Veeam Agent performs the backup job differently:

  • If the Oracle processing is set to Require successful processing , the backup job will fail.
  • If the Oracle processing is set to Try application processing, ignore failures , Veeam Agent will skip the database that is in the backup state and if there are multiple databases in the system, will try to connect to the next database. The skipped database will not be included in the backup.

If the Oracle database is running in the ARCHIVELOG mode, the Oracle database system keeps archived logs that allow to recover all committed transactions of the database . To learn more, see Oracle documentation .

If the database operates in the ARCHIVELOG mode, Veeam Agent performs the following operations:

  1. Veeam Agent switches the database to the backup mode. Veeam Agent changes the database state using the Oracle functionality.
  2. Veeam Agent creates a snapshot of the volume .
  3. Veeam Agent returns the database to the initial state.

If the Oracle database is running in the NOARCHIVELOG mode, the Oracle database system does not create archived logs. Logs that are created before the database is switched to NOARCHIVELOG remain untouched. In this mode, you can restore the database only to the state in which the database is contained in the restore point. You cannot recover transactions subsequent to that full database backup.

Читайте также:  Чем отличие windows от linux

If the database operates in the NOARCHIVELOG mode, Veeam Agent performs the following operations:

  1. Shuts down the database and changes the database states using the Oracle functionality.
  2. Creates a snapshot of the volume .
  3. Returns the database to the initial state.

Veeam Agent for Linux can connect to the Oracle database system and perform Oracle archived logs backup and/or deletion using one of the following account types:

  • System account — Veeam Agent uses the account of the machine OS. To connect to the Oracle database system, the account must be a member of the group that owns configuration files for the Oracle database (for example, the oinstall group).
  • Oracle account — Veeam Agent uses the Oracle account. To connect to the Oracle database system, the account must have SYSDBA rights.

Veeam Agent for Linux operating in the standalone mode supports the backup of archived logs, but does not support a separate schedule and retention policy for the backup of archived logs. This functionality is available only for Veeam Agent for Linux operating in the managed mode. For more information, see Oracle Archived Log Settings section in the Veeam Agent Management Guide.

In the ARCHIVELOG mode, the Oracle database system stores database archived logs to a certain location on the machine that runs the database system, as specified by the database administrator. Veeam Agent allows you to set up the following ways of archived logs processing:

  • Delete logs older than the specified time (in hours) . After the backup job completes, Veeam Agent deletes archived logs that are older than the specified time from the Veeam Agent machine. This helps make sure that logs do not overflow the storage space on the processed machine .
  • Delete oldest logs larger than the specified size (in GB) . After the backup job completes, Veeam Agent checks whether the total size of archived logs exceeds the specified size. After that, Veeam Agent deletes oldest archived logs that exceed the specified size from the processed machine . This helps make sure that logs do not overflow the storage space on the Veeam Agent machine .
  • Do not delete archived logs . Log files remain untouched on the Veeam Agent machine .

Veeam Agent processes archive logs via Oracle Call Interface (OCI) .

Requirements and Limitations for Oracle Processing

  • Oracle Database versions 11g – 21c are supported for all operating systems supported by Veeam Agent for Linux . To learn more, see System Requirements .
  • Automatic Storage Management (ASM) is not supported.
  • Oracle Real Application Clusters (RAC) are not supported.
  • Oracle Grid Infrastructure is not supported.
  • Oracle Database Express Edition (XE) is not supported.
  • SAP on Oracle is not supported.
  • Oracle Database architectures with Data Guard are not supported.

Источник

Оцените статью
Adblock
detector