OpenSUSE Linux Rants

OpenSUSE Linux Tips, tricks, how-tos, opinions, and news

My Resume  -  My LinkedIn Profile

January 18, 2007

LAMP specialist required

by @ 2:09 pm. Filed under Work-Related

At my place of employment, we are looking for a PHP programmer who specializes in Linux (SUSE preferred). Initially, it is a contractor position, but could become a full-time position. We are based in American Fork, UT. We are growing too fast to keep up. We need someone who has exceptional skills with each component of the LAMP stack. We use a lot of object-oriented PHP as well. This is mainly a PHP developer position. Email me if you are interested. smorris — at — suseblog — dot — com.

School has kicked in full force, again, keeping me from posting much on my blog. It’s almost been up a year. Woot.

Alrighty, well, if you are a PHP wizard and could use some extra money, please let me know.

January 9, 2007

Backing It Up Linux-style

by @ 9:06 am. Filed under bash, freebies

Here we go with another semester of school. Could someone please take a belt sander to my eyeballs?

At work, we have a script that I wrote for backing up our files, code, and data. It is actually one script for the filesystem backups, and one script for the database backups.

I am providing the filesystem backup script here in hopes that it may be of help to someone.

That said, let me tell you a little about it.

This script is meant to perform both full backups and incremental daily backups of a directory and all contents. It creates a bzipped tarball of it and then copies it over to a CIFS share. In our case, our tape backup is on the machine with the CIFS share.

How hard is it to run tar and then cp? It isn’t. What is harder is completely automating the entire process and taking close care to watch the success of every step. It should never fail, but if something does, retry a certain number of times. Log all steps and their outcome to a log file. When the script finishes, email the last 50 lines of the log to the system administrator.

Every step is verified. Meaning that any time a file is copied, the source and destination files are checked to make sure they are identical. Any time any command is executed, the return code is checked to make sure what we think should have happened is what actually happened.

It is pretty robust, and hasn’t even blinked since I gave my final approval to push it live. It could very easily be adapted to back stuff up to FTP or an NFS share or whatever else you need to back it up to.

If you would like to take a look, you can grab it here. Run it without any parameters to see how to use it. You will need to go into the script and put in the CIFS share, username, password, and local mount point. I was going to put everything on the commandline, but I was short on time, so I only put stuff on the command line that would change from machine to machine on our network. The CIFS share is always the same, so I just put that stuff directly into the script.

If you find it helpful, post a comment here and let me know.

OpenSUSE Linux Rants
Official OpenSUSE Linux Site

internal links:


SUSE Resources

search blog:


January 2007
« Dec   Feb »

57 queries. 1.023 seconds