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.
Connect with me on: