You are currently viewing all posts in the general category.
Tarsnapper: Managing Tarsnap Backups
Tarsnap bills itself as “online backups for the truly paranoid”. I began using the service last January. It fast became my preferred way to backup to the cloud. It stores data on Amazon S3 and costs $0.30 per GB per month for storage and $0.30 per GB for bandwidth. Those prices are higher than just using Amazon S3 directly, but Tarsnap implements some impressive data de-duplication and compression that results in the service costing very little. For example, I currently have 67 different archives stored in Tarsnap from my laptop. They total 46GB in size. De-duplicated that comes out to 1.9GB. After compression, I only pay to store 1.4GB. Peanuts.
Of course, the primary requirement for any online backup service is encryption. Tarsnap delivers. And, most importantly, the Tarsnap client is open-source, so the claims of encryption can actually be verified by the user. The majority of for-profit, online backup services out there fail on this critical point.
So Tarsnap is amazing and you should use it. The client follows the Unix philosophy: “do one thing and do it well”. It’s basically like tar. It can create archives, read the contents of an archive, extract archives, and delete archives. For someone coming from an application like Duplicity, the disadvantage to the Tarsnap client is that it doesn’t include any way to automatically manage backups. You can’t tell Tarsnap how many copies of a backup you wish to keep, or how long backups should be allowed to age before deletion.
Thanks to the de-duplication and compression, there’s not a great economic incentive to not keep old backups around. It likely won’t cost you that much extra. But I like to keep things clean and minimal. If I haven’t used an online backup in 4 weeks, I generally consider it stale and have no further use for it.
To manage my Tarsnap backups, I wrote a Python script called Tarsnapper. The primary intent was to create a script that would automatically delete old archives. It does this by accepting a maximum age from the user. Whenever Tarsnapper runs, it gets a list of all Tarsnap archives. The timestamp is parsed out from the list and any archive that has a timestamp greater than the maximum allowed age is deleted. This is seamless, and means I never need to manually intervene to clean my archives.
Tarsnapper also provides some help for creating Tarsnap archives. It allows the user to define any number of named archives and the directories that those archives should contain. On my laptop I have four different directories that I backup with Tarsnap, three of them in one archive and the last in another archive. Tarsnapper knows about this, so whenever I want to backup to Tarsnap I just call a single command.
Tarsnapper also can automatically add a suffix to the end of each archive name. This makes it easier to know which archive is which when you are looking at a list. By default, the suffix is the current date and time.
Configuring Tarsnapper can be done either directly by changing the variables at the top of the script, or by creating a configuration file named tarsnapper.conf
in your home directory. The config file on my laptop looks like this:
1 2 3 4 5 6 |
|
There is also support for command-line arguments to specify the location of the configuration file to use, to delete old archives and exit without creating new archives, and to execute only a single named-archive rather than all of those that you may have defined.
$ tarsnapper.py --help
usage: tarsnapper.py [-h] [-c CONFIG] [-a ARCHIVE] [-r]
A Python script to manage Tarsnap archives.
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
Specify the configuration file to use.
-a ARCHIVE, --archive ARCHIVE
Specify a named archive to execute.
-r, --remove Remove archives old archives and exit.
It makes using a great service very simple. My backups can all be executed simply by a single call to Tarsnapper. Stale archives are deleted, saving me precious picodollars. I use this system on my laptop, as well as multiple servers. If you’re interested in it, Tarsnapper can be downloaded directly from GitHub. You can clone my entire backups repository if you’re also interested in the other scripts I’ve written to manage different aspects of backing up data.
It's better when you break things completely.
When things are only partly broken your inbox gets flooded with error messages…
Mark Two
Hi there. It’s been a while.
I took a year off from blogging. That wasn’t intentional. I just didn’t have anything to say for a while. Then I did have something to say, but I was tired of how the website looked. If the design doesn’t excite me I tend not to want to blog. (Call me vain, but I want my words to look good.) And redesigning the website – well, that requires an entirely different set of motivations to tackle. It took me some time to get that motivation, and then before I knew it we were here: 10 days short of a year.
During the development process I referred to this design as “mark two”, as it was the second idea I tried out.
The website still runs on Django. The blog is still powered by Vellum, my personal blog application. I’ve been hacking in it for over a year now (even when this website was inactive) and it is much improved since the last time I mentioned it. In the past six months I’ve seen the light of CSS preprocessors. All of the styling for this design is written in SASS and uses the excellent Compass framework. The responsive layout is built with Susy.
If you’re interested in these technical details, you will also be interested to know that the entire website is now open-source. You can find it on GitHub. Fork it, hack it, or borrow some of my CSS for your website.
The other big news is that I have begun to categorize blog posts. Yeah, it’s 2012 and I’m a little late to the party on that one. You may recall that I only began to tag posts in 2008. As it stands right now, all posts are just placed in the great big ameba of a category called “General”. Eventually, they will all have more meaningful categories – I hope. But it will be a while.
Things ought to be more active around here for the foreseeable future.
Sanyo Eneloop Rechargeable Batteries
I go through batteries at a fairly high rate. Electronic devices for the wilderness, such as my headlamp and GPS, see regular use. At home, things like my wireless mouse need power. The biggest drain are my lights – particular in the winter, when they are used to light my regular commute.
This last spring I decided to invest in a set of rechargeable batteries. Although some of my devices run on CR123 batteries, most use AA or AAAs. To start with, I was concerned only with being able to recharge the AA and AAA batteries. Years ago I had a set of rechargeable batteries, but I think the technology was not very developed back then. They seemed to drain quickly and not hold many charges. Today, the market is different. Some brief research showed that there were many options out there, with positive reviews for most of them.
What most reviews seemed to suggest was that the majority of the offerings were all of equal quality, with most differences unlikely to be noticed outside of a laboratory. The most popular, though, seemed to be the Sanyo Eneloop and Maha Powerex batteries. I found some claims that, between the two, the Eneloops held a charge longer while on the shelf.
I decided to try the Eneloop batteries, and purchased a package that included a charger, 8 AAs and 4 AAAs. The charger can charge up to four batteries at once, either AAA or AA, but it must be done in pairs. It cannot charge one battery at a time, or three. This has turned out to be an occasional inconvenience. I have some devices that use three batteries, and some that need just one. To charge the batteries for those devices I always have to give the charger an extra battery.
The charger takes around five hours to bring a dead battery up to a full charge. I have read that the Maha Powerex MH-C9000 charger can charge the batteries in a shorter period of time. It also gives the user more control over the charge, which has the potential of increasing the life of the batteries.
The batteries themselves I have been very happy with. I don’t have the knowledge to provide any objective information on their chemistry or electronics. Suffice it to say that they work. They seem to last longer in the same devices than their non-rechargeable counterparts did. I have not noticed any degradation in those batteries that I have recharged. That is not surprising. Sanyo claims the Eneloop batteries can be recharged 1,500 times – a number I have not come anywhere near to approaching.
Since the initial purchase, I have bought two more packs of AA and AAA Eneloops. All of my electronics now run on rechargeable batteries, save for those few that require CR123 batteries. The batteries themselves are an expensive investment, but they have payed off. Now that I have a good number of both AA and AAA sizes, and am happy with the Eneloop brand, I would like to purchase a more specialized charger, such as the aforementioned C9000.
If you use any non-rechargeable AA or AAA batteries in your electronics, I recommend giving Eneloops a try. The financial savings alone is enough of a benefit to justify their use.
Learning Morse Code
Although it’s no longer required for the amateur radio Technician license, I have decided to learn Morse code. Despite it’s age, Morse remains one of the most effective ways to transmit information over long distances using minimal infrastructure and power.
To begin, I have printed and laminated the code chart from learnmorsecode.com. This makes encoded and decoding Morse a simple (although not fast) task. I’ve also put a variety of audio files consisting of slow Morse transmission on my media player. With a notebook and pen, I can practice decoding the messages wherever I am.
I’m aiming for 10 minutes of practice per day.
A Confluence of Wilderness
Begin where Forest Road 63 ends. Step around the barrier and immediately enter the Wild Sky Wilderness. Parallel the north fork of the Skykomish River along the old road, watching as the road slowly changes into trail. Shortly, enter the Henry M. Jackson Wilderness. Pass a junction with the Pass Creek Trail.
Continue along the north fork of the Sky, as the trail slowly gains elevation. Enter into meadows with views of Long John Mountain and June Mountain to the north and Skykomish Peak to the south. Climb still further, and reach Dishpan Gap.
At the junction, consider a short detour north to nearby Blue Lake and Pilot Ridge, in the Glacier Peak Wilderness, but decide against it. Instead, take the Pacific Crest Trail south.
Walk along the ridge. Gaze south, to far off Stuart Peak, and west to the distinctive snow-capped peaks of Gothic Basin and surroundings. Feel some sense of satisfaction at having traveled a piece of this country.
Head over Wards Pass, pass the junction with Cady Ridge, and reach Lake Sally Ann. Pitch camp. Eat dinner. Wish your moon-shadow a good night, and retire.
Rise in the morning. Not too early, not too late. Feel the warmth of the morning sun. Break fast, break camp, and step back onto the PCT. Head south once more.
Walk along the shoulder of Skykomish Peak, through open meadows, and look east to green Wenatchee Ridge.
Descend into old growth trees. Reach Cady Pass, and continue past it. At Pass Creek, sit and think. Contemplate a route along West Cady Ridge, but allow laziness to win and choose the shorter path along Pass Creek.
Descend the gradual valley of Pass Creek, crossing the low creek once or twice. At the bottom, reach a boardwalk that crosses the marsh. After, ford the cool and strong North Fork. Thereafter, arrive at the familiar junction with the North Fork trail.
Walk south and west, watching as the trail slowly changes into road. There, ahead, is Forest Road 63.
Modifying the Outdoor Research Flex-Tex Gaiters
I purchased a pair of Outdoor Research Flex-Tex Gaiters last spring. I had owned the full-length Rocky Mountain High Gaiters from Outdoor Research for a year, and was a big fan of them. They are not completely waterproof, but are highly water-resistant, and still maintain a level of breathability that makes them appropriate for year-round use. I find them adequate for protecting my legs when bushwhacking and for keeping me warm and dry when traveling in rain and snow – but I’m always looking to loose weight. My eye had been on the Flex-Tex gaiters for a while. I thought that they would be a good alternative to full-length gaiters during the warmer months: something lighter and cooler which could provide protection from debris but would also handle the wet and snow that is often found in the alpine summer.
When I went to purchase the gaiters, I found that sizing was an issue. Unlike Outdoor Research’s other gaiters, the Flex-Tex do not come in normal sizes. They are offered only in the combination sizes of Small/Medium and Large/Extra Large. In the Rocky Mountain High gaiters I wear a medium. The Small/Medium Flex-Tex gaiters were far too small for me to even get on. The Large/Extra Large gaiters fit well around my footwear, but were loose at the top around my calf. Unlike other gaiters from Outdoor Research, the Flex-Tex had no adjustment to tighten the fit.
I purchased them anyway, thinking to give them a shot. After using them on an early season trip in the snow, it was evident that they would not work. The loose top allowed too much snow to enter the gaiter.
Rather than giving up on the gaiters and immediately returning them, I held on to them for a while. I thought that it would be simple enough to modify the gaiters by adding a new cuff on top of the gaiter, creating a channel of material through which could run a thin piece of webbing. The webbing could be cinched down around the leg and secured with a camlock. This would provide the same adjustment mechanism as that found on my full-length gaiters. It would not be a perfect seal, but short gaiters will never keep out as much debris as tall ones.
The gaiters lay neglected for a while. A few months later I found myself in Seattle Fabrics and wound up purchasing the needed webbing, as well as some stretchy Lycra material which I thought would serve as the added cuff. Then I forgot about the project again.
Eventually, I remembered the gaiters, and wanted to get them done. At that time I had some material left over from hemming a new pair of Kuiu Attack Pants. The Kuiu pants are made out of Toray Primeflex, an impressive soft-shell which I discussed in my review of the Kuiu Guide Gloves. While heavier than the Lycra, I thought that Primeflex would provide more durability and be a better match to the soft-shell of the Flex-Tex gaiters.
The project was a success. With the Primeflex cuff sewn atop the gaiters’ normal cuff and a piece of webbing put through it, I can cinch down the top of the gaiter around my calf and secure it with the camlock buckle. Because the top of the gaiter has not been modified to be permanently smaller, I can still wear the gaiters over pants – although I almost always wear them next to skin. I have not done much post-holing in snow this summer, but the new cuff has provided a tight enough seal to keep out flying snow that comes from glissading down snowy slopes and kicking steps on the way up. Neither rocks, dirt, nor twigs have yet to find their way in.
Now that I have a proper fit, the Flex-Tex gaiters have become my preferred wear. They are breathable, water-resistant, and tough. At 5.29 ounces, the modified gaiters are only slightly lighter than the 6.98 ounces Rocky Mountain High gaiters. It is not a huge difference, but I find that I still prefer the Flex-Tex gaiters. The Rocky Mountain gaiters I never wore specifically for debris. They stayed in my pack until I encountered wet or snow. The Flex-Tex gaiters are comfortable and breathable enough to wear all the time – even when gaiters are not necessarily needed – which makes them more efficient at keeping out debris. For my type of travel, I find the Flex-Tex gaiters more functional than short gaiters that I’ve tried from other companies, such as Integral Designs and Dirty Girl.