Introduction About Site Map

XML
RSS 2 Feed RSS 2 Feed
Navigation

Main Page | Blog Index

Archive for the ‘Programming’ Category

Reliable Backup Mechanism

Data Recovery - presentation

T ODAY I would like to explain, in a relatively shallow level of depth, my most basic backup routines. I will concentrate on a somewhat simplified perspective and that which involves my current backup approach for local files, as opposed to the Web. The method is largely automated, owing to cron jobs (scheduler-driven). More details and method were described in older blog items. For example, have a cursory look at:

At present, I continue to seek and stick to a robust backup mechanism that is rather immune to human error, as well as hardware failures. I take the ’stacked backup’ approach (keep several cumulative/progressive backups) and I always remain paranoid, as to be on the ’safe side’ of things. I fear (and maybe even loathe) situations where I might lose data as this costs a lot of time and can even lead to considerable emotional pain, especially in the case of irreversible loss. As a result, I have scripted all my backup routines. I can just set it all up and thereafter forget about it, so frequency of backups can be increased without extra cost (time). I would like to share a few commands that I use in this blog post, for whatever it’s worth. Here are bits referenced from the crontab file, as well as some corresponding and related scripts.

First of all, here is a command which takes all the settings files (beginning with a dot) and puts them on the external storage media, datestamped. It’s possible to go further and compress (e.g. using gzip), but it makes the entire process much slower.

tar -cf /media/SEA_DISK/Home/Home-Settings/home-settings`date +%Y-%m-%d`.tar ~/.[0-z]*

Here is a simple way of preparing a datestamp-named directory.

mkdir /media/SEA_DISK/Home/`date +%Y-%m-%d`

I then take all files to be backed up, slicing them into volumes of 1 gigabyte (the filesystem will not accept files that exceed 4 gigabytes in size).

tar -cf - /home/roy/Main/BU|split -b 1000m - /media/SEA_DISK/Home/`date +%Y-%m-%d`/Baine-`date +%Y-%m-%d`.tar

Lastly, important files that change frequently are copied without any compression.

cp -r /home/roy/Desktop/ /home/roy/.kde/share/apps/kpilot /home/roy/Main/MyMemos
/home/roy/Main/kpilot-syslog.html /media/SEA_DISK/Home/Misc_local #local

I prefer to send copies of these files off-site as well, just for the sake of redundancy.

konsole -e rsync -r /home/roy/Desktop /home/roy/.kde/share/apps/kpilot
/home/roy/Main/MyMemos /home/roy/Main/kpilot-syslog.html
/home/roy/public_html roy@baine.smb.man.ac.uk:/windows/BU/Sites/SCG #and remote

In the above, Konsole is just a convenient graphic-textual wrapper for these operations that spew out status or flag errors, shall they ever emerge (a rarity).

I use tape archives to retain nightly stacks. Every night I use rsync to replicate my main hard-drive and to avoid the existence of deprecated files, I create a fresh copy twice a week, using rm -rf followed by scp (could be rsync as well, in principle) and a storage unit whose total capacity is 0.3 terabyte keeps stacks of the files before each rm -rf operation. Here are some bits of code which are hopefully self-explanatory.

konsole -e rsync -r roy@baine.smb.man.ac.uk:/home/roy/* /home/roy/Main/BU/ &

For a fresh copy of a remote home directory, begin by erasing the existing files.

rm -rf /home/roy/Main/BU/*

rm -rf /home/roy/Main/BU/.[0-z]*

Then, copy all files using a simple remote copy command.

konsole -e scp -r roy@baine.smb.man.ac.uk:/home/roy/* /home/roy/Main/BU/ &

The stacked backups that are dated get deleted manually; and quite selectively so! One should permit reversal to older states of the filestore by leaving sensible time gaps between retained backups. This prevents backups from being ‘contaminated’ too quickly. Important files are often replicate on file/Webspaces, so the most I can lose if often less than one day’s worth, due to hard-drive failures that are physical. The files are kept on 3 separate archives in 2 different sites in Manchester (home and the University; used to be three sites before I left one of my jobs). All in all, I hope this inspired someone. If not, at least it would serve as a page I can reference friends to in case they seek something similar.

More tips on *nix-oriented backup can be found in a recent article.

Bloated Applications Deter Some Users

Faces in GIMP

AS time progresses and computer hardware matures, there appears to be a worrisome trend. Backward compatibility, and sometimes practicality and simplicity, are being compromised. Applications get ever more bloated, attempting to be the entire world, and more.

Take, for example, media players that extend infinitely. Some of them turn from simple music players into a fully-blown video player, a Web browser, a music store, a sound mixer, and even an editor or playlist manager that is fairly sophisticated and employs greedy engines. From something small that occupies a megabyte of RAM and does its work reliably, the application can soon devolve into a complex resource pig.

There ought to be support for plug-ins that facilitate lightweight use, but the idea is often discarded, quite unfortunately. This, as a matter of fact, is one of the arguments for backing Open Source development, with healthy user and developer communities. Hooks can accommodate extensions that do not distract maintainers of the core and do not truly detract from its quality (e.g. stability).

For this reason, to use a personal example, I use Thunderbird as what it truly is: a mail client (as well as Horde’s mail facility for Web-based access tot the accounts). I don’t use Thunderbird for newsgroups and feeds. These are ‘plugs’ for gaps which Thunderbird merely attempts to fill, while retaining simplicity (and thus its lack function). So instead, I use a highly-versatile tool, KNode, which was created and designed to accommodate newsgroups in its entirety. It is designed to deliver the functionality at its best. For feeds, I use a pro-feeds application rather than some off-the-hook ‘application’ or a Web service. Truthfully, I tried alternatives such as Feedlounge, which is Web-based (I was even a project tester briefly), but it was just too slow and it lacked function that I already had in RSSOwl, which I help test as well.

Web Applications Without JavaScript

Horde

Web-based calendar in the Open Source Horde project

ONE of the more ingenious technologies around involves user interfaces that are embedded in Web pages. Taking full advantage of powerful, modern Web browsers, it is possible to build fully-blown applications that are operable from merely any platform. One of the latest packages as such achieves all of this without any JavaScript. Have a look at the project summary.

ZK is an open-source Ajax Web framework that enables rich UI for Web applications with no JavaScript and little programming. With event-driven feature-rich components, developing becomes as simple as programming desktops. With a markup language, designing becomes as simple as authoring HTML.

3-D Interaction Development Environment

Metisse

Screen-shot of Metisse for FVWM

IMAGINE to yourself a world (or a desktop environment rather) where everything lies in 3-D space. Imagine interaction with objects, which takes into account the ‘depth’ Z of one’s arm, rather than just the (X,Y) coordinates — those that are delivered from the conventional mouse.

Croquet is an intersting project that provides an SDK for 3-D environment. It could potentially make it all a reality. Pseudo-3d (stereo imaging) displays exist already.

Wordpress Bug and Trac Repellency

WordPress 2.0 nightly

I have this sick habit, which is my tendency to keep track of bug reports I have submitted to projects. As uninteresting as it may be, here is my latest report to WordPress:

Leak’ Outside Bounding Border

[Latest nightly in use]

The appearance of the dashboard is inarguably impressive, so call it a pet peeve perhaps: I find the following box spillover somewhat of an eye sore, which should be trivial to fix. The “Write post” box is extended when the items on the left are expanded, but what about those the reside on the right-hand-side?

Local Screenshots

I sometimes feel like a bug report which is not recognised or awarded for (if not financially, then at least on a personal level), there is little or no incentive to intervene and assist further.

I must admit that I lost a fair bit of passion for WordPress development. I have been less willing to help once it began to drift onto a commercial agenda (Automattic). But as I digress, I may continue to contribute to a project whose code is GPL‘d; a project that has impact on many sites and enriches people’s on-line experience. I still feel discouraged to do more debugging when somebody else out there gets paid for it. The forum mavens have expressed similar sentiments before.

One Decade of Proprietary Remains

CD's pile

THE head of the Apache project — the project which runs about two-thirds of the world’s Web sites — suggests that free software will rein. He predicts the end of commercial software to be only a decade away.

Apache’s Greg Stein says commercial software’s days are numbered. Instead, we’ll be paying for software support in the years ahead, he says

So on the face of it, commercial software already fights a losing battle.

Related items:

Turning 30 Thousand

Pause/Resume Demo
My pause/resume demonstrative program

EARLIER this afternoon noticed that my MATLAB profile had gone past the 30,000 count milstone. That count corresponds to the number of downloads of my code and programs over at MATLAB Central. I keep track of these numbers three times a week using HTML syndication. After some hesitance, I thought it was worth raving about; just because I rarely get the chance! [smile /]

Related item: A short write-up on an honourable highest position: first world-wide. This was my greatest moment of excitement, for which my grandfather popped some champagne.

Retrieval statistics: 20 queries taking a total of 0.766 seconds • Please report low bandwidth using the feedback form
Original styles created by Ian Main (all acknowledgements) • PHP scripts and styles later modified by Roy Schestowitz • Help yourself to a GPL'd copy
|— Proudly powered by W o r d P r e s s — based on a heavily-hacked version 1.2.1 (Mingus) installation —|