Link Search Menu Expand Document

Recipe: Automatic Backup Schedule with crontab

Expected deliverables:

Scheduled Oracle Database Backup every day at 10:00 AM

Time to complete: 5 minutes

Ingredients: The account with Oracle SYSDBA access. The oracle environment should be set. Configured Veeam Plugin for Oracle RMAN.

Before you start: User account with SysDBA permissions. Veeam Plugin for Oracle RMAN installed and configured.

Method:

  1. In the example below, we are going to configure crontab to run Oracle RMAN backup every day at 10:00 AM.
  2. Run “crontab -e” commands to open crontab editor.
  3. Add the line 0 10 *** \pathtoRMANscript\rmanbackup.sh

Example RMAN script:

cat «EOF >./rmanbackup.sh #!/bin/bash ORACLE_SID=ORCL; export ORACLE_SID PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

RMAN Target /

run { backup database plus archivelog; };

EOF


Back to top

Copyright © 2023 Solutions Architects, Veeam Software.