giza: Giza White Mage (Default)
[personal profile] giza
Having recently upgraded my machines to OS/X Leopard (which will be the subject of another post), I decided to try installing the program Duplicity onto my G4/G5 Mac so that I could use it in conjunction with rsync.net. Duplicity is a wrapper for rsync and rdiffdir that can be used to perform both full and incremental backups of your filesystem. It also supports many transfer methods including FTP, scp, rsync, WebDEV, and Amazon S3. In short, it's a pretty badass backup system.

While there don't seem to be any major issues when trying to install it under Linux, installing it under OS/X Leopard is a bit... interesting. The purpose of this post is to more clearly define "interesting" and document how to actually get Duplicity working, and to save others the same issues that I had deal with earlier in the afternoon.

First things first, make sure you've downloaded and installed Fink. Fink provides apt-get functionality to OS/X and gives you access to a whole bunch of UNIX software.

After downloading and untarring the package from the Duplicity website, try building the software with:
python ./setup.py build
If you're a lucky winner, you'll see a bunch of errors starting with this:
_librsyncmodule.c:25:23: error: librsync.h: No such file or directory
This means that librsync hasn't been installed. So go do that:
apt-get install librsync
Since the library will be installed in /sw (used by Fink to keep its stuff separate), you'll need to build Duplicity as follows:
python ./setup.py --librsync-dir=/sw build

Now install Duplicity:
sudo python ./setup.py install
Now try running it. Duplicity should promptly complain in the form of a traceback that ends with:
ImportError: dlopen(/Library/Python/2.5/site-packages/duplicity/_librsync.so, 2): Library not loaded: /sw/lib/libintl.1.dylib
Referenced from: /sw/lib/librsync.1.dylib
Reason: image not found
Some quick checking revealed that version 3 of libintl was installed by the libgettext3-shlibs package. Why was version 1 not installed? I don't know. Why does librsync require version 1? No idea.

At this point, we do the computer equivalent of a "Hail Mary" pass:
ln -s /sw/lib/libintl.3.4.3.dylib /sw/lib/libintl.1.dylib
Yes, I really did just tell my system that version 3 of that library can be used as version 1. Amazingly enough, it actually worked! In general, doing this sort of thing is not a good idea, since we're expecting a library that is 2 major revisions older than what is actually installed. The fact that it does work however, does speak good about the programmer who wrote the library.

So, let's try and run Duplicity again:
File "/Library/Python/2.5/site-packages/duplicity/gpg.py", line 22, in <module>
import GnuPGInterface, misc, log, path
ImportError: No module named GnuPGInterface
...somebody shoot me.

So anyway, now we have to go to the GnuPGInterface page and download that module. Assuming you downloaded and untarred it, here's how to install it:
python ./setup.py build
python ./setup.py install
Amazing. That was actually painless.

Let's try running Duplicity again:
[pardine:~/tmp/duplicity ] $ duplicity
Command line error: Expected 2 args, got 0
Enter 'duplicity --help' for help screen.
Success! Well, sorta. At least the program runs now. Documentation is is here and the manpage is over here. I can also offer some advice that I learned:

- The first backup is a full backup. Subsequent backups are automatically incremental backups.

- Want to list files in the backup? Use the list-current-files command.

- If you don't want to use encrpytion, try the --no-encryption option. Personally, I'm not a big fan of encrypting backups, because if you lose your key, all your backups go poof.

- If you are using SSH/scp to back up and you don't have an ssh key set up, be sure to tell Duplicity to ask for your password with --ssh-askpass. Even if you set the environment variable FTP_PASSWORD with your passphrase, you'll need to leave this switch in.

Happy backups!

(no subject)

Date: 2008-07-20 11:45 pm (UTC)
From: [identity profile] simbab.livejournal.com
Check your HTML/CSS in that entry. On my friends page (and [livejournal.com profile] boomeroo's, who has a different style sheet) the code-quotes or whatever they are are sea green on white and basically unreadable.

(no subject)

Date: 2008-07-20 11:50 pm (UTC)
From: [identity profile] giza.livejournal.com

I explicitly set the text color to black in the blockquote tags. See if that helps.

(no subject)

Date: 2008-07-21 12:11 am (UTC)
From: [identity profile] simbab.livejournal.com
That did the trick, thank you.

(no subject)

Date: 2008-07-21 07:28 am (UTC)
From: [identity profile] elfasi.livejournal.com
Why not just use Time Machine? :)

(no subject)

Date: 2008-08-11 06:52 am (UTC)
From: [identity profile] giza.livejournal.com
Because my webhost uses Duplicity (http://blog.nearlyfreespeech.net/2008/05/08/new-offsite-dead-drop-backup-service/).

(no subject)

Date: 2008-07-21 07:33 am (UTC)
From: [identity profile] furahi.livejournal.com
Awww... My server's too old to run it :(

(no subject)

Date: 2008-07-22 05:45 pm (UTC)
From: [identity profile] rassah.livejournal.com
I've been using Unison for ages now. How does that compare to what you're using?

Profile

giza: Giza White Mage (Default)
Douglas Muth

April 2012

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags