This page describes how to migrate data (languages, projects, and users) from an old Pootle 1.2 installation to the new Django-based Pootle 2.0. This is a special type of Pootle upgrade, since there were many changes between these versions.
Bundled with Pootle source code, under the
pootle/tools/ directory there is a script called
import_old_prefs.py which does the dirty job of importing the old data from the
.prefs files into the new Django-based database.
In order to proceed with the migration, first of all you need to copy the translation files (PO, XLIFF) from the old Pootle server to the new location of the files (in case it has changed).
You will also need to have located the
users.prefs files. They can usually be found under
/etc/pootle/ in Debian installations. Alternatively you can copy these files to your working directory.
Once you get to this point, you will need to create the minimal database structure to after fill in the data. So change your current directory to Pootle's source root and run:
$ python manage.py syncdb --noinput
This will create all the necessary tables in the database.
Finally, you can run the migration script as follows:
$ python import_pootle_prefs /path/to/old/pootle.prefs /path/to/old/users.prefs
Depending on your previous Pootle installation this may take a while.
Now, before you can start browsing to the Pootle front page, and in case of using SQLite as your database backend, you need to make sure that the
pootle.db file under the
dbs directory is writable by the user running the Apache process.
Lastly, if your setup is fine, you can access Pootle using your web browser. Please note that the first time you try to access the main page Pootle needs to calculate all the stats so this may take some time. This only happens on the first time.
Alternatively, if your Pootle installation is big and you're worried about your browser's timeout when calculating statistics, you can run the
manage.py refresh_stats command from the shell.
.prefsextension. Those files are not used anymore because that information now resides in the database.
Since Django's built-in User model has a limitation of 30 characters and asks for first and last names, names longer than 30 characters won't be imported as they were.
If the name is less than 30 characters length, it will be stored as-is in the
Otherwise, the name will be split by spaces and the first 30 characters will be part of the
first_name field. The remaining characters (also up to 30 characters) will be stored in the
Since the way permissions are stored and handled has changed in Pootle 2.0, they are not imported. You will need to reset your settings manually.