Vou postar aqui um script de backup (e suas variações) que está mais que testado e que me ajuda bastante quando preciso fazer algo rápido e manual.
==================
-- Backup
==================
rman target / << EOF
allocate channel d1 type disk MAXPIECESIZE 8G;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
SQL 'ALTER SYSTEM CHECKPOINT';
backup AS COMPRESSED BACKUPSET format '/backups/PROD/%d_%Y%M%D_%I_%s_%U.dat' database;
sql 'alter system archive log current';
backup AS COMPRESSED BACKUPSET format '/backups/PROD/%d_%Y%M%D_%I_%s_%U.dat' archivelog all;
release channel d1;
}
exit;
EOF
==================
-- Backup deletando archives e backupsets
==================
rman target / <
allocate channel d1 type disk MAXPIECESIZE 8G;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
SQL 'ALTER SYSTEM CHECKPOINT';
backup AS COMPRESSED BACKUPSET format '/backups/PROD/%d_%Y%M%D_%I_%s_%U.dat' database;
sql 'alter system archive log current';
backup AS COMPRESSED BACKUPSET format '/backups/PROD/%d_%Y%M%D_%I_%s_%U.dat' archivelog all;
DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'SYSDATE-5';
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
release channel d1;
}
exit;
EOF
========================
-- Backup somente de archives
========================
rman target / <
allocate channel d1 type disk MAXPIECESIZE 8G;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
SQL 'ALTER SYSTEM CHECKPOINT';
backup AS COMPRESSED BACKUPSET format '/backups/PROD/%d_%Y%M%D_%I_%s_%U.dat' archivelog all;
release channel d1;
}
exit;
EOF
Simples e objetivo caso precise rodar algo manualmente.
Abraço
Mario