• Arun Kumar

Schedule Datapump Export in crontab

Backups using EXP / EXPDP is at times useful than RMAN as it allows to take backups of specific tables and does not require db in archivelog mode.

Create EXPDP Job

  1. Create a file which contains

EXPDP script: /home/oracle/backup_script

export DATE=$(date +%m_%d_%y_%H_%M)
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

$ORACLE_HOME/bin/expdp username/password@sid directory=export_dir dumpfile=backup_$DATE.dmp logfile=backup_$DATE.log full=y

2. To schedule EXPDP backup in CRONTAB: Backup every day at 20:00 (8:00 PM)

# crontab –e –u oracle
00 20 * * * /home/oracle/backup_script

3. The first five fields are

  • Minute (0-59)

  • Hour (0-23)

  • Day of month (1-31)

  • Month of year (1-12)

  • Day of week (0-6)


Recent Posts

See All

Oracle 12c to 19c Database Upgrade

In this article we will be looking at two most commonly used methods of upgrading Oracle database from 12c to 19c Pre-upgrade tasks Upgrade using DBUA Upgrade using Manual Method You can perform a dir