Tag Archives: python

Portage Hooks

Now that school is done for the 2009-2010 year, I’m back at it in Neuvoo again. I’m finishing off a long-planned and fairly major addition to portage I call “portage hooks.” The fun thing is I’ve submitted some patches to zmedico and the response has actually been more positive than previous experiences. solar seemed to be (tentatively?) liking the idea as well.

So, here’s what portage hooks are all about. If you have portage-utils installed, you will have an /etc/portage/postsync.d/ directory. Scripts in this directory are executed after portage syncs the tree. I thought this was a great idea, and I thought it should be expanded so there are other opportunities for unofficial extensions. Continue reading

Advertisements

Backing up with Duplicity, Effortlessly

Duplicity has a wonderful design feature: it’s really really simple.

Duplicity has an annoying design flaw: it’s really really simple.

In case you didn’t notice, Duplicity‘s simplicity is both helpful and inefficient. It’s extremely easy to start using Duplicity because its usage is so very simple. Want to back something up? Just write “duplicity /some/directory ftp://user@host.com/some/other/directory” for FTP backup, or “duplicity /some/directory file://some/other/directory” for local backup, or any other protocol out of the 11+ protocols it supports. All it does is write files to the location of your choosing, and then it can recover and list files (either latest or at a date of your choosing) from the backup directory you give it.

This simplicity is really great for the simple use-cases, like backing up a home directory. It’s when you get into databases, exclusion and inclusion rules, and other such fine print that you have to plan a little.

I’ve got three different “things” I have to back up: my web development stage, my remote shell (mainly for irssi), and my home directory. Each one presents its own challenges, which I break down below. Continue reading