Skip to content
December 28, 2011 / doganay

HOW TO BACKUP ARCHIVE LOGS IF YOUR ARCHIVE DESTINATION IS FULL

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Hi,

If you want to backup your archive logs but your arch.  destination is full (or almost full), you have some choices:

1- If this DB is not a critical one, you can delete archive logs and start and immediate full backup. (You will lose some changes, so be careful: if that DB is not critical you can do that)

2- You can move arhive logs to another location and create symbolic links.

Second one is safer. You can implement as follows:


export ARC_DIR=YOUR_ARCHIVE_DEST
export NEW_DIR=YOUR_TEMP_ARC_DEST
mkdir $NEW_DIR
cd $ARC_DIR
## Move some archive logs to NEW_DIR.
## mv arch_....
cd $ARC_DIR
## Better to use absolute path as follows:
ls|awk '{print "ln -s '$NEW_DIR'/"$NF" '$ARC_DIR'/"$NF}'
## After arch. backup finishes, symbolic links are unlinked and archive logs remain.
## To delete arch. logs:
rm $NEW_DIR/*arc
rmdir $NEW_DIR

try and pray 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: