Search This Blog

Wednesday, December 3, 2008

טיפים למשתמש חדש (newbie)

NY TIMES מציע טיפים בסיסיים שכדאי למשתמשים חדשים להכיר, והוא עושה זאת בכתבה ידידותית מאוד ומותאמת מאוד לידיעות ולהבנה של משתמשים חדשים.

הקשיים שמהם סובלים משתמשים חדשים הם לא ייאמנו. לא רק מבחינת היחס של הסביבה הותיקה יותר אליהם, אלא בעצם שינוי הפרדיגמה שהם נדרשים לעשות, לעתים בלי שום הכנה מוקדמת.מי שחי את חייו השלוים בלי מחשב, ופתאום מוצא עצמו נדרש להתמודד עם הישיבה הזו  מול מסך וציות לשלל חוקים שאיש לא הכין אותו אליהם, עובר הלם תרבות.

אבל משתמשים חדשים הם לא תמיד מה שאנחנו חושבים שהם. אני עדיין זוכר את הקשיים בהם נתקלו משתמשי מערכת שסייעתי בשדרוגה לפני כמעט עשר שנים, כשהם עברו מהעבודה מול טרמינל של מיינפריים אל תוכנה מודרנית בסביבת חלונות במסגרת שדרוג הכרחי, פרי ההתאמות לבאג 2000. המעבר הזה מהסביבה הטקסטואלית אל הסביבה הגרפית, שלכאורה אמור היה להיות מעצים ומקל ונעים, היה מאוד קשה ומתסכל עבור חלק גדול מהם, ששלטו שליטה אבסולוטית במערכת הישנה (איתה הם חיו כמעט עשרים שנה של שיפורים ושדרוגים אבל נאמנות לעיצוב אחד) וכעת, בגיל יחסית מתקדם, נדרשו להתקדם לתפישה אחרת לגמרי.

גרוע מזה, כמו שנוכחתי לדעת לפני כמה שנים, בתקופה חווייתית מאוד מחוץ להייטק, וצפיתי במשתמשים ותיקים מאוד, אנשים מוכשרים ורבי יכולת במקצועם, שהתגלו אל נוכח עיני הצופות במלוא מערומם מבחינה טכנית. התברר לי שמשתמשים עשויים להיות תקועים במין מצב מוזר שכזה, במסגרתו הם שיננו בעל-פה כיצד להתמודד עם האתגרים הטכניים השונים, כשבעצם, מבחינת רמת האוריינות שלהם, הם לא שונים מהרבה מתלמיד כיתה א' שלמד בעל-פה  את החוברת הראשונה שנלמדה בכיתה. כלומר, הם יכולים להתמודד איתה - אבל רק איתה.

לצערי אני עדיין לא מכיר מדריך אחד שהוא טוב מספיק עבור משתמשים חדשים, אבל בהחלט כדאי לכלול את הכתבה הזו ברשימת-הקריאה שכדאי להציע למשתמש חדש. 

Saturday, November 29, 2008

Backup Principles

The Principles of Backup
Years ago I ran into the The TAO of Backup  and loved it. Time has passed, and I still love its wisdom, even if I do tend to phrase things a little different, and is a great illustrated explanation backup principles:

  • Plan the Coverage, Frequency  and the Time Scope:backup every file in your care, do it in a frequency that matches the rate of produced work and its value, and be sure to maintain an 'archive window' of old backups, in a systematic manner, that will enable access to the oldest restore points you might need. 
  • Separation: Don't keep your backups near the source. With modern networks it is much easier than it used to be, and yet, when cold backups  are discussed, this wisdom is less remembered: make sure to keep the cold backups in a different space than that of the backed-up system. If possible, make sure that a copy of the cold backups is taken away from the facility to another place, bearing in mind major catastrophes. For family data, I would say such a ritual should take place on a yearly basis. For a large organization, even one with replicated data over several sites this may seem like something archaic, and yet I would recommend at least a 3 months cold copy archive (monthly basis would make me happier, but cost/benefit is a bitch). If you need to argue, remind your superiors that large organizations keep facilities in large cities, where large disasters may take place. Wouldn't it be safe to have one copy of the backup sent somewhere far and less central, for those rare disasters that terrorists might bring upon our heads? 
  • Security: Remember that backups must be guarded just as well as the original information. 
  • Testing and Integrity: Make sure that your backups are ok: that the medium is working; that the contents are the ones that should have been there; that they actually work in different test scenarios, from the nice to the least nice. When you plan test scenarios, harass different users from different departments; Imagine the stupidest accidents; Plan for the most horrible thing that can happen. Don't think I am paranoid. Instead remember: It is the role of the system administrator to take care. No one else is thinking of these situations. That is why you should. 

The summary of scope to planning backups
When approaching a backup plan the following should be taken into consideration: - Stability - Availability - time to restore - alternatives in disaster - another computer (cold/warm fail-over) - another site - backup quality - loss of information in restore (backup update frequency) - restore possibilities - ability to live with backup - Minimal Disturbance to Everyday Work during backup.

Useful links: 

What happens if you do not follow the advice brought here? Start practicing on the following song.

Yesterday: A DBA's Backup Song
(to be sung to the tune of Yesterday. 
 quoted from a copy of the Oracle Week Times - a leaflet
 given in Oracle Week 2000; Rob Cosgrove says he is the author.)

Yesterday, 
All those backups seemed a waste of pay 
Now my database has gone away 
Oh I believe 
in yesterday. 

Suddenly,
There's not half the files there used to be
And there's a deadline hanging over me 
The system crashed 
so suddenly.

I pushed something wrong 
What it was. I could not say 
Now my data's gone 
and I long for yesterday-ay-ay-ay.

Yesterday,
The need for back-ups seemed so far away
Thought all my data was here to stay 
Now I believe in yesterday. 


[update:  12/03/2010] 

Tuesday, October 7, 2008

how to set static IP on a CentOS machine

A friend asked me for help, setting up a CentOs machine for the installation of an Oracle Database. I emailed him a short/dirty version of the the following, and thought that this might help other inexperienced linux/centos users; truly experienced linux folk won't need this, naturally.

I'm assuming that you are working with the KDE desktop, but the same should apply to the Gnome desktop (I'm talking about the software term, not the magical term;  Gnome as a desktop environment has some advantages, but I belong to the KDE fans).

In the upper menu navigate to system/preferences/network connections - 

Choose system eth0 [assuming this is your network card]
Edit
Choose the ipv4 tab
Choose method: manual 
Press the "add" button and enter the following - 

  • static ip (a free and suitable one to your network)
  • subnet mask [wiki article]
  • gateway 
Move on to the dns servers field, and enter  the dns server (in many modern routers, the router serves both as a gateway and local dns server). 

Press "apply". 

Now you need to restart the network service so that the configuration will become effective. 

In the upper menu, navigate to 
system\ administration\services
Stop the Networkmanager service. 
Start it. 
(you could also use the Restart button)

And there you have - your system is reconfigured with a new, static, IP address. 

Several remarks
1. this is a short howto regarding IPv4. IPv6 setup in this context ain't that different but not within the scope of this post (one would assume that under IPv6 all addresses would be static, but old habits die hard...)

2. if you wish to learn what is happening under the hood, read the following chapter in the CentOS deployment guide, and take a look at the following files - 
  • /etc/resolv.conf
  • /etc/sysconfig/network
  • and at the files under the directory - 
  • /etc/sysconfig/network-scripts/
    bearing names in the pattern of 'ifcfg-<interface-name>'
you can also use the man command to learn a little about the ifconfig and the hostname  commands.
(this is a minimalistic list, assuming you have little time, and most probably skipped the "rtfm" bit).

3. why static ip ? 
1. for db servers, as well as many other servers who have a rich network life, this is the norm for many good considerations, which might justify another post, one day, regarding this norm, workarounds, and the questions of best practices.  
2. it eases work in local network environments where the DNS setup is shaky/nonexistent (this is a suprisingly common situation in small/messy companies, and is a growing reality in many houses which find themselves, unaware, with several network-aware computers or gadgets). I suspect that it might be a  widespread reality with in the foreseeable future, as home networks grow with smart phones and gadgets. As those machines are expected to be of a dual-network identitity - internet/phone-company related and local-network/home-router related, most chances are that for the average joe, the home-network will be a total mess (and a heaven for hackers, but this, again, is a subject for another post, another day, maybe).

4.  how to see IP address in centos, not from command prompt ? 
well, this issue is  an old one (see this 2005 discussion, one of my favorites, regarding seeing the IP address on Ubuntu). There are workarounds,  but as far as I can tell, this issue is still unanswered in the vanilla, out-of-the-box CentOS interface and most just use /sbin/ifconfig. Before you mock linux users for their ifconfig addiction, oh Windows-user, ask yourself - honestly - what is your day-2-day practice of seeing your machine's IP address in Windows (I'm willing to bet you CMD, and then ipconfig). 

[last reviewed/updated: 17/04/2013]