SUSE Conversations


Learn Linux scripting with me!

noneal

By: noneal

December 30, 2009 12:02 pm

Reads:452

Comments:2

Rating:0

Scenario:

We upgraded a customer’s Novell Teaming 1.0 Server to 2.0. During the process we realized that the customer did not have a backup of his Teaming Data & DB’s. Let’s not be down on the customer, he was new to Novell Linux as well and his Online Backup Service had accidentally left out the Teaming Server all together.

Well, instead of calling the company that maintains their online backup and have them login, make adjustments to the backups, charge them money etc, we created a script that would grab the Teaming Data and move it to an NSS Volume that was already part of the night backup jobs~!

Please remember, we are new to scripting so I am sure there are 100 ways to do this…..Thanks to MPS for all the assistance!

#!/bin/sh

if test -d /backup/
       then
       echo "Backup Directory Exists"
else
       mkdir /backup/
       echo "Created Backup Directory"
fi

cd /backup

mysqldump -uroot -pn0vell --opt lportal > /backup/lportal.sql
mysqldump -uroot -pn0vell --opt sitescape > /backup/sitescape.sql

tar -czf /backup/teamingfiles.tar.gz /home/icecoredata
tar -czf /media/nss/VOL1/teamingbackup/lportalbkup.tar.gz /backup/*

exit

So, we create the backup directory, dump the mysql db’s, grab the Teaming user data, zip them up and place them over on the NSS Volume where the backup is already set to cover. Lastly, we cron this to run every night.

Thanks for reading. I hope it helps as we all learn to become SUSE Linux Enterprise Server certified!

________________________________
Norm O’Neal
2010 Novell Knowledge Partner
Team NTEG / Team NUGI
“Serving One Community”

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Tags:
Categories: Enterprise Linux, SUSE Linux Enterprise Server, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

2 Comments

Comment

RSS