Fail-Safe Backup Methodology

Introduction

Backing up data is a critical component of managing one’s digital life. Computers and operating systems can be replaced, but not data.

The operational keyword is fail-safe. While having just one data backup method is much better than having none, having two or three almost guarantees that data will be recoverable, short of an EMP attack.

I recommend a three prong approach to backups consisting of a hard drive based image (a clone) that is performed just once (or at yearly intervals), cloud based data backup and a local backup onto a USB hard drive. Furthermore, the local backup has a measure of redundancy by using two drives that are rotated at daily or monthly intervals. Forking from this recommended approach is at your own risk.

fork three prong

Image Based Backup

When a PC is completely configured with all the tweaks and installed software, consider making a disk image. This is essentially a clone of the entire hard drive, byte for byte. The cloned hard drive is then put away in a safe place. When the original hard drive crashes (all hard drives crash eventually), the clone can be slipped into the PC by any technician and the PC is up and running again. All that’s needed is to update the data and make a new clone. Some people might want to make a new clone every year or so as they see fit, in recognition of the fact that the PC probably changes enough software-wise and update-wise to warrant a new clone. When making a new clone, do not reuse the original cloned hard drive for the simple reason that if the hard drive crashes during the cloning process, the user is left with nothing.

A clone cannot be transferred to a different PC. It will only work with the original PC or an identical PC.

Local Backup

Local data backups are the FIRST line of defense in case of a crashed drive or a decision to buy a new PC. Cloud based backups are not the first line of defense for reasons explained later. There’s lots of backup software both free and commercial that will backup data to an external drive.

I’ve included my own backup software here as a download but it does not do versioning. It overwrites previous versions of files with the new one. I’ve learned that’s not a show stopper for most people, especially if there is a cloud based backup that does versioning. What’s important is that whatever is used be kept as simple as possible. If a cloud based backup is running constantly, then a second constantly running local backup program can slow a PC to a crawl. That’s why I recommend an on-demand backup utility like mine.

A local backup should consist of two external USB powered portable hard drives that are only connected to the computer for the duration of the backup. If left plugged in, the drive is subjected to unnecessary wear and tear and possibly the vagaries of a third world power supply (which is what exists here in Bethesda). And if the PC is stolen, the backup drive may also disappear.

Additionally, a virus like CryptoWall will destroy the contents of the backup drive, rendering the backup useless when one needs it most.

The two drives should be labeled 1 and 2, and used respectively on odd or even months or days (it’s difficult to determine if a particular week is odd or even). The reason for using two drives is for data redundancy. When a user needs the backup most, at least one will work. Additionally, if a data item becomes corrupted and a backup has just been performed, the other drive will hopefully contain an uncorrupted version.

Remember, local backups are always faster and easier to use for recovery than cloud based backup. That’s why it’s the first line of defense.

When the drives are not being used, they should be kept somewhere cool and dry. They should be stored or locked up in a location where an intruder or thief is unlikely to find them.

Always (ALWAYS) safely remove USB storage devices. Never just pull out the USB cord.

Cloud Based Backup

Cloud based backup is a critical part of data management. There may be situations where a local backup has been destroyed, lost or stolen. Then and only then does the cloud based backup become the first line of defense.

If security is a concern, many cloud based backups optionally allow you to manage your own key. While this insures that your data is safe from any prying eyes, it also means that if you lose your password, you lose your data. Nobody will be able to recover it.

It’s important that one check the cloud based backup often to insure that backups are really being performed.

Advertisements
Posted in Uncategorized | Leave a comment

Deprecated! OS X External Monitor Woes

Deprecated!

What kind of a word is “deprecated”? Has anybody outside the rarified upper realms of Unix actually ever used this word? Has the word ever been said? Or is it just a Unix “man page” word?

It usually refers to an operating system feature that is no longer supported, and supposedly on the way to feature heaven. But the feature still works.

I cringe when I hear “deprecated”. To me it means a really nice and easy to understand feature is being replaced by something impossible to remember and hopelessly complex.

What I’m thinking about in specific is the Unix command “cron”. Cron has been honored with the “deprecated” label in OS X (which is really Unix). It supposedly wasn’t good enough and will eventually disappear, to be replaced with “launchd”.

Cron is used to automatically start tasks at a certain time. The start time can be very precisely controlled by inserting a configuration line in the crontab file.

Cron is elegantly simple. Here is a typical cron entry:

*/5 * * * * ~/documents/brightness -d 1 .75

It’s stored in a file called crontab. Crontab can contain many entries like the one above. The layout of a crontab entry is shown below.

# * * * * * command to execute
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ └───── day of week (0 – 6) (Sunday to Saturday)
# │ │ │ └────────── month (1 – 12)
# │ │ └─────────────── day of month (1 – 31)
# │ └──────────────────── hour (0 – 23)
# └───────────────────────── min (0 – 59)

And that’s all there is! The */5 in my command above means every 5 minutes. By itself, the asterisk would mean every minute. If it were “5”, it would be the fifth minute of every hour of every day of every month and every day of the month. In other words, every 5 minutes. See how simple and concise this is.

Launchd is described in the link below. This must be a joke! I’ll learn it on the day cron is really dead.

http://tinyurl.com/psa9z7g

Cron proved very useful in fixing the problem described below.

OS X Dual Monitor setup

OS X, from Lion on up, has a serious problem with a dual monitor setup. When an external VGA monitor is hooked via Thunderbolt, the laptop display dims incrementally over several hours until it’s completely dark. This happens no matter if the ambient light sensor has been disabled in system preferences. The dimming is aggressive in this dual monitor setup, rendering the laptop display increasingly dim as the hours go on, to the point where the screen is black after about a day. I laughed the first time I saw the display after it had turned completely black. That’s a real bug.

This has happened on two different Macbooks with Lion and Yosemite so it probably afflicts all OS X laptops. The external monitor is VGA via Thunderbolt. Whether this happens with Thunderbolt to HDMI or DVI is beyond my immediate ability or desire to test. It’s irrelevant to my situation as I have no choice.

I have disabled dimming in preferences for both keyboard and screen and permanently turned off BezelServices thru the command line. No joy.

The external monitor is unaffected.

The screen never dims when the screensaver is running. From the moment the screensaver starts until the moment it stops, the screen brightness does not change. It may be dim from the last dimming event, but it does not change. The display dimming becomes apparent only when the screensaver stops (due to mouse or keyboard activity) and then the screen looks much dimmer than the last time you saw it, and the clock screensaver will also be just as dim next time it starts. This is important to remember when you read the fix.

Only Apple knows why this is happening. Apple probably doesn’t care. This happens in Lion and Yosemite so I have to assume it happens with all the OS X versions in-between. It does not happen in Snow Leopard.

So if Apple doesn’t care, the question is what can be done to stop that from happening.

I truly need the laptop display at almost full brightness all the time. It serves as an analog clock day and night, and doubles as a nightlight at night. See picture below.

aCIMG0681

aCIMG0680

The only fix seems to be going back to Snow Leopard. That’s out of the question.

So I have a problem. I have a screen that turns dark and useless in 24 hours. It’s my clock and my nightlight. Apple ain’t gonna fix my problem. So what do I do?

What finally worked was a somewhat complex kludge involving a crontab entry (see above) that runs a command line screen brightness utility every 5 minutes.

A tip of the hat to Jon Stacey (https://github.com/jmstacey). He wrote an efficient and handy utility called “brightness” which is run from the OS X command line. It can be used to find out the monitor identifier, to find out the existing brightness level and to set the brightness level for a particular display (in this case the laptop display).

It is this command I call from cron every 5 minutes to reset the brightness. Since the brightness does not change when the clock screensaver is on, there’s no constant dimming and brightening of the laptop display, which some people would find rather annoying. And the clock screensaver is running 98% of the time. That’s all the laptop display is ever used for. When I’m using the Macbook, it’s always through the external monitor and a KVM (which always works fine).

From terminal, do the following:

Sudo crontab –e

This puts you into vi, which is a powerful unix text editor. If you don’t know how to use it, don’t attempt this.

Insert this crontab entry

*/5 * * * * ~/documents/brightness -d 1 .75

Save it and that’s it. Kludge that it is, it works for me and keeps my clock and nightlight nice and bright. Thanks, Apple.

Posted in Uncategorized | Leave a comment