I’m as guilty as anyone of treating cron as if it’s “just a shell”, and it finally bit me today. I had a quick-n-dirty Postgres backup command that worked wonderfully from the command line: /usr/local/postgres/bin/pg_dumpall -U pgadmin | gzip -9 > \ /usr/local/db/backups/pgsql/pgdump.`/bin/date +”%Y%m%d-%H%M%S”`.gz But when I put this into my crontab, I started getting…
Category: Sysadmin
Quick CVS Cheat Sheet
Actually, I’d love to say that I’ve moved completely to using git instead of CVS, but the truth of the matter is that, for a recent project where I’m just trying to consolidate a whole bunch of admin scripts, organize them under one (managed) roof, and (most importantly) get a bunch of admins on board…
Finding Needles With ’sort’ and ‘uniq’
I had to do this recently, and so I thought it would be useful to share this for two reasons: Someone else may need to do it and find this technique useful Someone else may know a better way of doing this Quick ‘n’ dirty explanation: you have two lists. One list is a superset…
Three tips to keep you focused
If you’ve read my previous posts relating to time management, you might realize by now that I tend to approach it from the opposite direction of a lot of other information sources. My philosophy is that it is easier (for me) to identify things that represent a mismanagement of time and find creative solutions to…
Code Editor Goodness: Komodo Editor
Geez…. for a sysadmin I sure seem to write a lot of code. In the past year I’ve written an assignment type for Moodle in PHP, cobbled together an API in Perl to manage various LDAP resources, and I’ve just completed a prototype for an XML-RPC server that will be an interface to our data…
Trying to make friends with Python… again
I like the idea of Python. I have diverse interests, technically, and I like to think that there’s a language out there that I can use to write small script, a large website, a stored procedure, or a distributed system. The same language is used to write a very large chunk of systems code on…
More news for Spanning Sync Refugees
First, there are lots of people who are pretty outraged by the new Spanning Sync pricing of $25/year for a subscription service or $65 for a one-time license. The people who are the most outraged are those who are intimately familiar with how buggy it is because they were beta testers. I’m in that camp…
Safety Precautions When Using the ‘rm’ Command
Usually, if I have a bunch of files that need to go away, I’ll see what I can do to avoid using ‘rm’. Many times, I can move a directory containing the files out of the way, or I can make a backup directory and move the files there. However, at some point, those files…
Migrate a NIS password map to LDAP… FAST
I came across this awk hack in an old code repository today. I slapped it together a couple of *years* ago now, and it was never really worthy of being distributed for general use. However, if you’re like me and never made friends with the PADL migration tools and all you need is a quick…
Shell Quoting Conundrum
Somebody on a mailing list asked a question about shell quoting. The quoting issue would not have been so difficult had it not been for the fact that it was a command that was to be run on the other end of an SSH connection. Here’s the command he was trying to run: ssh -t…