WebSphere Issues

10/02/2010

Backup WP DB2 databases

Filed under: DB2, Linux, Scripts, WebSphere Portal — Ishtiaque @ 10:26 am

curDate=`date +%d%m%y_DBs_WP615`
cd /opt/Backups/databases/temp

echo “Backing-up fdbkdb into /opt/Backups/databases/temp directory…”
su – db2inst1 -c “db2 backup db fdbkdb”
echo “Backing-up lmdb into /opt/Backups/databases/temp directory…”
su – db2inst1 -c “db2 backup db lmdb”
echo “Backing-up cusdb into /opt/Backups/databases/temp directory…”
su – db2inst1 -c “db2 backup db cusdb”
echo “Backing-up comdb into /opt/Backups/databases/temp directory…”
su – db2inst1 -c “db2 backup db comdb”
echo “Backing-up reldb into /opt/Backups/databases/temp directory…”
su – db2inst1 -c “db2 backup db reldb”
echo “Backing-up jcrdb into /opt/Backups/databases/temp directory…”
su – db2inst1 -c “db2 backup db jcrdb”

echo -e “nArchiving all the databases in /opt/Backups/databases/”$curDate
tar -cvf /opt/Backups/databases/$curDate.tar *

echo -e “nDeleting all the databases from /opt/Backups/databases/temp directory…n”
rm -f /opt/Backups/databases/temp/*.*

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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

Blog at WordPress.com.

%d bloggers like this: