Export Backup with Date and Time

Export Backup with Date and Time

Export with Date and Time

Hello friends, in this article we are going to discuss how to take export backup with date and time, so follow me step by step. In Oracle, the EXPORT dump file name includes 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.

Take export backup using EXP

Use the below command to take export backup using EXP.

$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 a dump file name with the 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 the following file name.

dbfullbkp_02072017.dmp
dbfullbkp_02072017.log

Read - How to install ORACLE 11g ASM and RDBMS software in LINUX 5

Connect with me on:

Instagram: https://www.instagram.com/digitalshripal
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

2 thoughts on “Export Backup with Date and Time

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top