giza: Giza White Mage (Default)
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!
giza: Giza White Mage (Default)
 

So, awhile back I wrote about external hard drives, partly because I was interested in performing backups. I also noticed some speed increases when I did backups to my external hard drive, so I decided to look into performing regular backups onto it in additional to the semi-regular backups I do onto DVDs.

Why back up to an external hard drive?

I don't have to waste a DVD every time perform a backup, especially if I am making backups on a daily basis. Plus, the same amount of data can be backed up to my external hard drive in less time.

Note that I still back up to DVDs, since those are more durable and can easily be taking offsite. But those backups are done every few weeks at best, so backups to my external hard drive are done more frequently -- usually every few days.

What is backed up?

Various documents, my photography (I take a lot of pictures), source code for projects I am working on, my Moneydance financial data, and tarred/gzipped backups of websites that I manage.

What is not backed up?

Any movies and music that I have--since those files are static (i.e., they never change), I just burn them to DVD when I have enough content to actually fill a DVD. There's simply no need for me to keep backing them up over and over. Sure, it's nice to have multiple copies of this stuff, but I simply do not have that much of a need for my MP3s. (And it's not like I can't rerip them from my CD collection) Any pictures that are older than a year old are also burned to DVD and removed from my Pictures/ directory, since I am no longer working with them on a day-to-day basis.

It only goes downhill from here, with lots of technical stuff. I warned ya! )

Profile

giza: Giza White Mage (Default)
Douglas Muth

April 2012

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

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags