Export Backup with Date and Time

Hello friends, in this article we are going to discussed how to take export backup with date and time, so follow me step by step.

In Oracle the EXPORT dump file name including Date and Time.

If you are taking export backup using EXP command the use below formats to generate dump file name with date and time.

exp system/passwd file= full_ocpdb_bkp_`date +%b_%d_%y_%H_%M_%S.`dmp log= full_ocpdb_bkp_`date +%b_%d_%y_%H_%M_%S.`log statistics=none full=y compress=y

EXPDP Backup above 10g versions

If you are taking export using the EXPDP command and you want to generate dump file name with date then you can use the below formats.

expdp system/passwd directory=backup dumpfile=dbfullbkp_"%date:~7,2%%date:~4,2%%date:~10,4%".dmp logfile=dbfullbkp_"%date:~7,2%%date:~4,2%%date:~10,4%".log

The above command will create following file name:

dbfullbkp_02072017.dmp
dbfullbkp_02072017.log

You must read to like: Oracle Data Pump

Connect with me on:

Instagram: https://www.instagram.com/shripaldba
Linkedin: 
https://www.linkedin.com/in/shripal-singh
Twitter: 
https://twitter.com/ocptechnology
Facebook: 
https://www.facebook.com/ocptechnology
YouTube:
 https://www.youtube.com/ocptechnology

Share this
Share

1 thought on “Export Backup with Date and Time”

Comments are closed.

Share