Migrate from eMule to aMule
- 1 Brief History
- 2 Migration
- 3 Configuration Files
- 4 Importing Missing Configurations
- 5 Temporary & Sharing Files
- 6 In the end...
Some coders, unsatisfied by that client, started developing a new one, called eMule. Its source code was open, so anyone able to program could read it and modify it, and so they did. Many client versions came up with patches and new code. Soon the eDonkey2000 guys started criticising eMule, blaming constant slowdowns in the P2P network on the large number of eMule clients. After an initial study phase, eMule developers decided to create a new p2p network leaving eDonkey2000 network alone. It was a success.
The Linux community started developing a Linux client able to connect to eMule's network: lMule was born. A multi p2p network program, mlDonkey added support to eMule's network; later lMule was renamed to xMule. But the winner is yet to come.
eDonkey2000 is now almost dead, and even charges for a professional version of its client.
Searching around the web you will find a lot of people saying the migration is easy: do not believe them! ;) Or better, it's easy because the temporary file format is compatible, but if we are talking about configuration files, then things are different.
There are two important parts in eMule: the configuration files and temp/shared files. Let's start with configuration files.
In eMule, these files are stored under config directory. In aMule, instead, the configuration files are stored under ~/.aMule directory (Linux) or in the ~/Library/Application Support/aMule directory (Mac), or, for example in the C:\Documents and Settings\<username>\Application Data\aMule directory in Windows. So the easy step is to copy the files from the eMule's configuration directory to aMule's. Good, so let's look further...
Configuration Files Automatically Imported
Many files are read and correctly imported into aMule; among them there are:
- clients.met, stores the other clients credits. When you download some from a client, you'll store in this file how much you have got, so you can promote that client when it will be in your upload queue.
- known.met, it's where details about the downloaded files are stored, the ones printed in green when searched again.
- known2.met, it's where AICH hashes of shared files are stored.
- server.met and staticservers.dat, it contains the saved eMule servers.
- ipfilter.dat and ipfilter_static.dat, which contain the IP denied to connect/share files with you.
- emfriends.met, it contains the friends list.
- addresses.dat contains a list of URLs from where aMule will download server.met files to merge with its current server.met file.
- cryptkey.dat and preferences.dat, they uniquely identify you to other clients, so you can keep credits to their side.
- key_index.dat, load_index.dat, nodes.dat, preferencesKad.dat and src_index.dat are Kademlia files.
- shareddir.dat paths of shared directories, but it is only compatible with eMule when using aMule for Windows.
That's the good news. The bad is still to come...
Configuration Files NOT Automatically Imported
Here starts the "war bulletin":
- Configuration file: eMule uses preferences.ini but aMule uses amule.conf.
- Categories: They are the tabs separating files in the download list; in eMule they are written in the file Category.ini but aMule writes them down into amule.conf.
- eMule's shareddir.dat file is not compatible with aMule when switching to any aMule not running in Windows, since paths are so different. In this case, aMule will automatically generate this file once you set in Preferences the directories you want to share.
- Some files in eMule's config directory are not used by aMule: AC_BootstrapIPs.dat, AC_IPFilterUpdateURLs.dat, AC_SearchStrings.dat, AC_ServerMetURLs.dat, fileinfo.ini, k_index.dat, preferencesK.dat, s_index.dat, statistics.ini and webservices.dat. Most of the above files come from old eMule installations and are now deprecated.
Below you'll find how I imported the missing configurations.
Importing Missing Configurations
This command line should help you generate the categories information from eMule's Category.ini file (put the command on the same line):
grep -E "^\[Cat|^Title|^Incoming|^Comment|^Color|^a4afPriority" Category.ini | sed 1,6d | sed 's/#/\\#/g' | sed 's/&/\\&/g' | sed 's/a4afPriority/Priority/g'
This escapes even # and & characters, because I've got them in my Category.ini file; maybe there will be other chars to be escaped that have to be included in the script (edit this article, if it is the case). The script deletes the first 6 rows, that is the first category, since it's a dummy one: that category is the first one in eMule, which contains all/uncategorized/etc files; aMule has its "all" tab and do not need this entry. Cut&paste the script's result into amule.conf.
Under [General] in amule.conf, you have to define a variable count (or change its value if already defined) with value:
echo `grep -c "^\[Cat" Category.ini` -1 | bc
This variable holds the number of tabs to display: note that even if you have imported 10 categories, but leave count=1, only one category will be displayed.
At the end, the categories configuration in amule.conf should look like:
[General] Count=... [Cat\#1] Title=... Incoming=... Comment=... Color=... Priority=... [Cat\#2] Title=... Incoming=... Comment= Color=... Priority=... ...
Note: If you import the categories before importing the temp files, they will be classified as in eMule.
eMule's statistics are available in two different files: preferences.ini and statistics.ini. I found statistics in the latter file more up-to-date than the ones in the former file.
Looking into statistics.ini you'll find that all statistics are under Statistics tag. Even inside amule.conf there exists this tag, so the logic conclusion is to copy from span statistics.ini to amule.conf. In this last file, there are two keys, MaxClientVersions and DesktopMode, that should not be deleted.
Note: Sadly, very few values get imported: seems only downloaded and uploaded bytes. Maybe it's not the right place where I've written those keys, or maybe aMule uses other ones. Only using aMule will reveal it.
Since they are very client-specific and important for its correct behavior, I suggest to redefine them by the Preferences aMule form. Maybe it would be long and boring, but done it once, they will last forever, almost.
If you're really brave, you can try to import directly some keys from preferences.ini to amule.conf, but then don't argue if it doesn't work.
Temporary & Sharing Files
For sharing files we have very few things to do: since they are already downloaded, the only thing to do is say to aMule where they are and wait for rehashing.
In the end...
Those are the steps I've followed to migrate from eMule to aMule. Some things may be wrong, and others maybe could be done better, so if any corrections/ideas/additions come to your mind, take the time to update this article!