How to Use RMAN Backup Archivelog All Delete Input Safely and Effectively?

Archive logs help recover Oracle databases after failure. This guide explains how to use the RMAN backup archivelog all delete input command. Learn its meaning, benefits, steps for use, and key safety tips before you run it.

download-icon
Free Download
for VM, OS, DB, File, NAS, etc.
jack-smith

Updated by Jack Smith on 2026/01/06

Table of contents
  • What Backup Archivelog All Delete Input Means?

  • Why Use Backup Archivelog All Delete Input?

  • How to Back up Archived Logs Using RMAN?

  • Protecting Oracle Databases with Vinchin Backup & Recovery

  • Backup Archivelog All Delete Input FAQs

  • Conclusion

Managing Oracle archive logs is a daily task for many database administrators. If you do not handle these logs well, your storage can fill up fast and your recovery options may be limited. Have you ever wondered how to back up and clean up archive logs in one simple step? The backup archivelog all delete input command is a popular answer. In this article, we will break down what this command does, why it matters, how to use it safely and efficiently—and what best practices you should follow at every level.

What Backup Archivelog All Delete Input Means?

The backup archivelog all delete input command is used in Oracle Recovery Manager (RMAN) to back up all archived redo logs and then delete the original files from disk after a successful backup. This command ensures that you have a backup copy of every archive log before removing it from your storage. The delete input part tells RMAN to delete only the specific copies of the logs that were just backed up—not all copies in every archive destination. For example, if your logs are stored in both LOG_ARCHIVE_DEST_1 and LOG_ARCHIVE_DEST_2, only the copy read during backup will be deleted.

This approach helps you manage disk space while keeping your backups safe. It also reduces manual intervention because RMAN handles both tasks—backing up and cleaning up—in one operation.

Why Use Backup Archivelog All Delete Input?

Backing up and deleting archive logs in one step offers several benefits that go beyond saving time. First, it helps prevent critical errors like running out of disk space on primary or secondary storage locations—a situation that can halt database operations with errors such as ORA-00257: archiver error. Second, this method guarantees that no log file is deleted until it has been safely copied to your chosen backup location.

Third, using this command simplifies scripts for regular maintenance jobs. Instead of writing separate routines for backing up then deleting old logs—or worse yet—deleting them manually after checking backups yourself, you let RMAN automate everything securely.

Finally, automating archive log management supports compliance requirements by ensuring consistent retention policies across environments. Wouldn’t you rather spend less time worrying about missed deletions or accidental data loss?

How to Back up Archived Logs Using RMAN?

Using RMAN to back up and delete archive logs is standard practice for Oracle DBAs at any skill level—but there are important steps to follow for safety.

Before starting:

1. Make sure you are connected as an authorized user on the correct target database instance.

2. Confirm that your RMAN repository (control file or recovery catalog) reflects current information about available archives.

To connect:

rman target /

Once connected:

BACKUP ARCHIVELOG ALL DELETE INPUT;

This backs up every archived redo log known to the control file—then deletes only those copies just backed up from their source location.

If saving space matters or network bandwidth is limited:

BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL DELETE INPUT;

Compression reduces storage needs but increases CPU usage during backup creation.

For better tracking or custom organization:

BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL DELETE INPUT
  TAG 'ORCL_ARCHIVE'
  FORMAT '/u01/backup/rman/%d_%T_%s_%p_ARCHIVE';

Here’s what happens under the hood:

1. RMAN scans for eligible archived redo logs based on its repository metadata.

2. It creates a new backup set—optionally compressing files if requested.

3. After confirming successful completion of each file’s backup process, RMAN deletes only those original files just processed from disk (not untouched duplicates).

4. The resulting backup set lands exactly where specified by your format string or default settings.

If multiple destinations exist per log file (for redundancy), remember: DELETE INPUT removes only one copy—the one read during this session—from its respective destination directory; other copies remain unless explicitly targeted later.

Need full cleanup across all locations?

BACKUP ARCHIVELOG ALL DELETE ALL INPUT;

This variant deletes every copy of each backed-up log across every configured destination.

You can also embed these commands within larger scripts:

RUN {
  BACKUP DATABASE;
  BACKUP ARCHIVELOG ALL DELETE INPUT;
}

This script first secures your entire database state before handling archived redo log rotation—a best practice when scheduling nightly jobs or preparing for major upgrades.

After running any such job, always verify results using built-in reporting tools like:

LIST BACKUP OF ARCHIVELOG ALL;
LIST ARCHIVELOG ALL;
REPORT OBSOLETE;
SHOW ALL;

These commands help confirm which files have been backed up successfully—and which remain on disk awaiting further action.

Protecting Oracle Databases with Vinchin Backup & Recovery

For organizations seeking streamlined protection beyond native tools like RMAN alone, enterprise solutions offer broader coverage and automation capabilities tailored for complex environments such as Oracle databases alongside MySQL, SQL Server, MariaDB, PostgreSQL, PostgresPro, and TiDB systems. Vinchin Backup & Recovery stands out as a professional enterprise-level database backup solution supporting these mainstream platforms—including comprehensive support for Oracle workloads featured here.

With Vinchin Backup & Recovery's robust feature set—including incremental backup options designed specifically for Oracle databases; advanced source-side compression; batch database management; flexible data retention policies including GFS strategies; plus essentials like scheduled backups—administrators gain faster protection cycles while reducing operational risk through automation and granular policy control across large-scale deployments.

The intuitive web console makes managing Oracle backups straightforward—even at scale—with four clear steps:

Step 1: Select the Oracle database to back up

Select the Oracle database to back up

Step 2: Choose the backup storage

Choose the backup storage

Step 3: Define the backup strategy

Define the backup strategy

Step 4: Submit the job

Submit the job

Recognized globally by thousands of enterprises for reliability and ease-of-use—with top industry ratings—Vinchin Backup & Recovery offers a fully functional 60-day free trial so you can experience its advantages firsthand; click below to get started today.

Backup Archivelog All Delete Input FAQs

Q1: Can I schedule BACKUP ARCHIVELOG ALL DELETE INPUT automatically?

Yes—you can use Oracle Scheduler or cron jobs calling an RMAN script containing this command at set intervals.

Q2: Will archive logs be deleted if my RMAN job fails?

No—RMAN deletes archives only after confirming successful completion of their corresponding backups; failed jobs leave originals untouched on disk.

Q3: How do I check which archived redo logs have been backed up versus deleted?

Run LIST ARCHIVELOG ALL inside an active RMAN session—it shows status details including whether each file remains present locally or has already been removed post-backup.

Conclusion

Backing up—and cleaning out—Oracle archive logs with backup archivelog all delete input keeps databases healthy while minimizing risk when done right. Used alongside proper precautions it forms part of efficient daily operations; teams seeking extra automation should explore how Vinchin streamlines these processes further with robust enterprise-grade solutions available today.

Share on:

Categories: Database Tips