Article
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"
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (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.
Related Articles
User Comments
The 'exit' at the end is
Submitted by mikewillis on 9 January 2010 - 1:53pm.
The 'exit' at the end is redundant.
If you want to learn shell scripting I recommend
http://tldp.org/LDP/Bash-Beginners-Guide/html/inde...
http://tldp.org/LDP/abs/html/index.html
http://www.davidpashley.com/articles/writing-robus...
- Be the first to comment! To leave a comment you need to Login or Register
Learning scripting - tips and approaches
Submitted by JenniC on 14 January 2010 - 9:44am.
For learning scripting, you may want to look at this article.
http://forums.opensuse.org/programming-scripting/418593-learn-shell-scripting.html
- Be the first to comment! To leave a comment you need to Login or Register


2