The OS Wars, part VIII: Penguin Preserves and Other Tasty Treats

Always have a backup plan. —Mila Kunis

As mentioned earlier, I wanted to set up an automatic backup system to regularly save the data on of my Linux machine. I have a really nice Tower of Hanoi system set up for my Windows machines, using a combination of 4NT-based batch files and a self-written program, which should prevent any major data loss from user error, hardware theft, or failure. I was hoping to do something similar for the Linux side of things.

I looked at the plethora of Linux backup systems, but decided to try to write my own — I’d learn more that way, and hopefully get something that does exactly what I want.

Unfortunately, programming Linux and the bash shell has sufficient minor differences from anything in my prior experience that it took me several days of on-and-off research and experimentation to come up with even a basic script for it. I also needed the smbfs and libnotify-bin packages, so that I could mount a backup directory on my Windows server via samba, and pop up a panic notification if anything goes wrong. Here’s what I eventually came up with (with blank lines between each actual line to counteract wrapping problems):

#!/bin/bash declare FullBackupDate=$(date '+%Y.%m.%d') mount -t smbfs //hephaestus/backup /mnt/backup || sudo -u headgeek notify-send -u critical -t 0 'Full Backup' "Can't mount backup drive" tar czvf /mnt/backup/fullbackup-$FullBackupDate.tgz /home/headgeek /etc /usr/local umount /mnt/backup

It’s run once a week, under the root account’s cron system. (Or at least, it should be — I won’t be able to test the cron part until the weekly time rolls around.) It’s nowhere near perfect yet, but it should get the job done while I refine it, adding daily incremental backups with the tar program’s --newer option and building the Tower of Hanoi system into it. I’ll also need to work these backup files into my rewritable DVD backup system, but this script isn’t responsible for that part.

So my backup system, such as it is, is ready.

While I was doing all of this, I accidentally removed the trashcan icon from the GNOME menu bar. In trying to get it back, I discovered a number of potentially useful little applets that you can put on them: a clipboard encryption applet similar to the aforementioned GPGShell program; a tiny little temperature-and-current-weather report utility, a processor/memory/network/swapfile monitoring program, “drawers” that you can stick launchers or toolbar things into when you don’t want them always visible and taking up screen space; a nice little sticky-note application that’s perfect for creating quick reminders of things; and others. I had assumed that the menu bars were fairly static items that you couldn’t do much with, as they are in Windows… I was delighted to find that that assumption was mistaken.

The multiple desktops system in Linux is simply beautiful. I’ve used multiple-desktop systems under Windows, and under OS/2 before that; I even wrote one at one time. None of them ever worked nearly as well as this one. Some programs — Microsoft Outlook being the most popular culprit — simply refused to cooperate with them at all. The design of this one is superior by far. I haven’t used one in several years, so it’s taking me a little while to get used to using them again, but I’m slowly working it into my daily routine.

One thing that I do like about Windows is the ability to set up certain key combinations to call up specific programs — I prefer to use the keyboard instead of the mouse for most tasks, it’s more efficient for most tasks. The “win” key on recent keyboards is great for that, since nothing but Windows uses win-key key combinations. I tried to set up something similar in Linux, using the Keyboard Shortcuts item, but it insisted that the win-keys were character keys, rather than shift keys. I dug into it and finally found a way around that: my left win-key is now a “meta” key instead of a “super” key (apparently it’s an emacs thing), and I have my win-key shortcuts. 🙂

So the OS Wars end in an uneasy truce between Linux and Windows, with Linux’s many advantages easily outweighing Windows in most areas, but Windows remaining indispensable for a few things at the moment. It looks like there’s only one more entry to make, a summary and comparison of the advantages of each OS. I’ll probably post that in a few days.

2 Comments

  1. I await the critique of Linux with baited breath. 😉

    My main usage of Windows is games, period. I never really used Windows enough to have an “indispensible” application, though I’m sure there are many. I’m thinking of getting cedega, or maybe vanilla WINE can run some of what I need. Please let me know what you think of cedega if you get it, I’d like to have some idea of how well it does things before I lay down $ for it.

    On the Windows front, I am teaching myself to write Windows apps out of sheer curiosity. I just put together my first .NET application, though I felt like it was Visual BASIC from all of the GUI tools; and that’s just with VS2000 Express, rather than the reportedly wizard-driven full-blown VS deal.

    I’m probably going to teach myself the Win32 API too, but that’s going to take some time and there’s less hand-holding, though as usual when there’s less hand-holding there’s some rewards in terms of flexibility I assume. I mostly put one togeather because I often do my modest programming tasks when I get frustrated with a game, and I didn’t feel like rebooting to Linux to encounter something more familiar (and *nix is a more sane a programming environment I might add, at least for someone not of the “Visual” generation. 🙂 I just was curious about my new compilers.)

    Anyhow, I still love Linux and use it for almost everything else but gaming, though now that I have a 21st century video card I do that occasionally, so I did reinstall Windows after years of just Linux. BTW, Beryl makes Vista (from what I saw on someone else’s computer) look like stone knives and bear-skins, and it doesn’t make you sea-sick either. 😉

  2. Since I still have to have Windows on my systems anyway, I’ll probably keep playing Windows games under it, instead of trying to play them under Linux.

    If you need any help with the Win32 API, let me know. I’ve gotten to be quite expert at it over the last nine years or so.

Comments are closed.