AleX's Blog

Random stuff on informatics, computer science, physics, etc.

Month: September, 2013

Configuring Unison

Unison is a file syncronization software, using the rsync algorithm.
Unlike rsync, Unison makes two-way file synchronization very simple.
Unison also allows you to syncronize files across different platforms and filesystems.
There are official Unison releases for several platforms, including Linux and Windows, although in my Windows machine I use Linux’s version through Cygwin.
You can actually also install a GUI for Unison (which probably come by default with some pre-compiled binaries, such as the Windows version).

It allows you to perform local syncronizations, for example between your main hard drive and an external hard drive, or with a remote host by using ssh.

If you want to sync two roots regularly, you should create a prefences file (.prf) file. Here’s an example of the file I use for mirroring my working directory in my SD card (FAT32) with my external hard drive (NTSF) in Windows (using Cygwin). In Linux this file should go in your .unison directory located in your home folder.


# Unison preferences file

# roots
root=/cygdrive/f/Documents
root=/cygdrive/g/DocumentsBackup

# for mirroring
force=/cygdrive/f/Documents

# to sync fat32
perms=0
fastcheck=true

# prevent unison from prompting the user
batch=true

Here I am mirroring my /cygdrive/f/Documents directory.
Note how I name the directories in the two roots in a different way. In this case, if by any chance the drive name changes, I am not mirroring things in the opposite direction! (an alternative is to completely disable mirroring)
Note that since I store my data in an SD card using the FAT32 filesystem which does not support the same set of permissions as NTFS or EXT , I set “perms=0” (otherwise Unison will complain about permissions).

And here’s the .prf file I use for synching my working directory with my server (via ssh):

# Unison preferences file

# roots
root=/cygdrive/f/Documents
root=ssh://alex@myserver/backupDirectory

# for mirroring
force=/cygdrive/f/Documents

# to sync fat32
perms=0
fastcheck=true

# prevent unison from prompting the user
batch=true

# to prevent the ssh connection from hanging
sshargs = -o ServerAliveInterval=120

One more thing that is wort mentioning, is that, even with ServerAliveInterval set to a large value, the synchronization may fail whenever there are many files or these a very large due to connection reset by peer.
In this case, what works for me is to synchronize smaller subsets of files before synchronizing the full roots.
This can be achieved via the path variable. Imagine you have a folder /cygdrive/f/Documents/foo/bar that you want to synchronize, using the roots above.
Then, by setting,


path = foo/bar

Unison will synchronize only that folder.

Please note that this aims to be a small introduction to Unison and not a comprehensive one. In case you need more information, you should always consult the user manual.

You can obviously schedule automatic synchronizations in Linux using crontab or identical tools in Windows, and using public key authentication but that is material for another post…

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Amitochondrial Eukaryotes

A defining characteristic of eukaryotes is the fact that they posses organelles and a differentiated nucleus.
A very important type of those organelles are the mitochondria.
It is an accepted hypothesis that mitochondria used to be prokaryotic organisms that established some sort of symbiosis with eukaryotes, and eventually lost their ability to live on their own (for example, mitochondria usually import cytoplasmic tRNA for transcription of mitochondrial DNA), this is know as the endosymbiotic theory.[1]

Now, something crossed my mind the other day: Do all known eukaryotes have mitochondria?
It seems obvious that there must have been a time when eukaryotes lacked mythocondria.
We also know that eukaryotes are able of obtaining energy in other ways than not respiration. Even human cells are cable of anaerobic (lactic acid fermentation) processes.
We can, however, understand that having mitochondria provides Eukaryotes with a huge advantage.
In Biology energy is usually measured in terms of the maximum theoretical number of units of ATP (adenosine triphospate) produced per unit of glucose. Well, lactic fermentation in our muscles is capable of producing only 2 units of ATP per unit of glucose while aerobic respiration is capable of producing 36-38, that’s around 18-19 times more![2] (bear in mind that these are estimations for the ideal case!)

So the question remains: do all known eukaryotes have mitochondria?
Well we know some eukaryotic organisms which seem to be amitochondrial, i.e. they lack mitochondria, such as members of the genus Giardia.[3] One can, however, detect remnants of mitochondrial DNA in their nuclear DNA. [3] Also, it seems these organisms, have some organelles that appear to be derived from mitochondria such as hydrogenosomes and mitosomes. [4,5] So it seems that even though they lack the organelle, they are descendant from some eurakyote that used to contain mitochondria. It is also quite plausible, that some of the proteins coded in mitochondria are still produced and that somehow they retain some of the functions (note that the it would make perfect sense for mitochondria’s proteins to be coded in our nuclear DNA. The fact that it is not, seems to simply imply that after the endosymbiosis took place there was either no evolutionary pressure for that or it was advantageous to keep both genomes apart).

Anyway, after this long dissertation it seems that there is agreement in the scientific community that no known eukaryote has a totally amitochondrial lineage, even though some seem to have lost mitochondria during evolution.[6]
As it is stated in [6]: “Since Trimastix retains genetic evidence of a mitochondriate ancestry, we can now say definitively that all known living eukaryote lineages descend from a common ancestor that had mitochondria.”

So while the simple answer to my question is “Yes, there are eukaryotes that lack mitochondria”, the full scenario is a tad more complex and more interesting than that…

[1] William F. Martin and Miklós Müller, Origin of Mitochondria and Hydrogenosomes (Springer, 2010).
[2] Eldon Enger, Frederick Ross and David Bailey, Concepts in Biology (McGraw-Hill, 2011).
[3] Jorge Tovar et al., Mitochondrial remnant organelles of Giardia function in iron-sulphur protein maturation. Nature, 426(6963), Nov 2003.
[4] M. van der Giezen, Hydrogenosomes and mitosomes: conservation and evolution of functions. J Eukaryot Microbiol. , 56(3), May-Jun 2009.
[5] R. E. Schneider et al., The Trichomonas vaginalis hydrogenosome proteome is highly reduced relative to mitochondria, yet complex compared with mitosomes. Int J Parasitol., 41(13-14), Nov 2011.
[6] Hampl V, Silberman JD, Stechmann A, Diaz-Triviño S, Johnson PJ, et al., Genetic Evidence for a Mitochondriate Ancestry in the ‘Amitochondriate’ Flagellate Trimastix pyriformis. PLoS ONE 3(1): e1383.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.