May 30, 2025

Pause RMAN backup

How to Pause and resume RMAN backup

There are certain times when backup is running for long and critical applications are hanging for limited resources. During that time, rather than killing the whole backup session, it is a handy option to pause the backup from server end and then resume it after the application transactions are completed. 

This is performed in a Development/testing environment.


Check the details of the Currently running backup:

col START_TIME for a15

col END_TIME for a15

col TIME_TAKEN_DISPLAY for a10

col INPUT_BYTES_DISPLAY for a10

col OUTPUT_BYTES_DISPLAY for a10

col OUTPUT_BYTES_PER_SEC_DISPLAY for a10

col output_device_type for a10


SELECT to_char (start_time,'DD-MON-YY HH24:MI') START_TIME,to_char(end_time,'DD-MON-YY HH24:MI') END_TIME, time_taken_display, status,input_type, output_device_type,input_bytes_display, output_bytes_display,output_bytes_per_sec_display,COMPRESSION_RATIO COMPRESS_RATIO FROM v$rman_backup_job_details WHERE status like 'RUNNING%';



Pause backup Query and Command:

set pages 0 feedback off

select 'TO PAUSE THE RUNNING RMAN BACKUP RUN THIS OS COMMAND:=>    kill -STOP '||listagg (p.spid, ' ')  WITHIN GROUP (ORDER BY p.spid) from v$session s, v$process p where s.program like 'rman@%' and p.addr=s.paddr;

Output Example: TO PAUSE THE RUNNING RMAN BACKUP RUN THIS OS COMMAND:=>    kill -STOP 1077 1256 1381 29481 29553 29583

--> Now run the kill -STOP <pids> on the server.


RESUME backup:

select 'TO RESUME A "PAUSED" RMAN BACKUP RUN THIS OS COMMAND:=>  kill -CONT '||listagg (p.spid, ' ')  WITHIN GROUP (ORDER BY p.spid) from v$session s, v$process p where s.program like 'rman@%' and p.addr=s.paddr;


Output Example: TO RESUME A "PAUSED" RMAN BACKUP RUN THIS OS COMMAND:=>  kill -CONT 1077 1256 1381 29481 29553 29583

-->Now run the kill -CONT <pids> on the server.


Terminate/Kill backup:

select 'TO KILL  THE RUNNING RMAN BACKUP RUN THIS OS COMMAND:=>  kill -9 '||listagg (p.spid, ' ')  WITHIN GROUP (ORDER BY p.spid) from v$session s, v$process p where s.program like 'rman@%' and p.addr=s.paddr;SQL>


Output Example: TO KILL  THE RUNNING RMAN BACKUP RUN THIS OS COMMAND:=>  kill -9 1077 1256 1381 29481 29553 29583

-->Now run the kill -9 <pids> on the server.


Hope this helps.


Best Wishes!!

No comments:

Post a Comment

If you have any queries/ any suggestion please do comment and let me know.

Recent Post

Check progress on expdp and impdp

 Check progress on expdp and impdp: In few cases we need to monitor the progress of an export or import job in oracle. below are the steps c...