Backing up and moving Weblate¶
Depending on what you want to save, back up the type data Weblate stores in each respective place.
Where this is located depends on your database setup.
The database is the most important storage. Set up regular backups of your database, without it all your translation setup will be gone.
Native database backup¶
The recommended approach is to do dump of the database using database native tools such as pg_dump or mysqldump. It usually performs better than Django backup and restores complete tables with all data.
You can restore this backup in newer Weblate release, it will perform any
necessary migrations when running in
migrate. Please consult
Upgrading Weblate on more detailed information how to peform upgrade between
Django database backup¶
Alternatively you can backup database using Django’s
command. That way the backup is database agnostic and can be used in case you
want to change database backend.
Prior to restoring you need to be running exactly same Weblate version as was
used when doing backups. This is necessary as the database structure does
change between releases and you would end up corrupting the data in some way.
After installing the same version, run all database migrations using
Once this is done, some entries will be already created in the database and you will have them in the database backup as well. The recommended approach is to delete such entries manually using management shell (see Invoking management commands):
./manage.py shell >>> from weblate.auth.models import User >>> User.objects.get(username='anonymous').delete()
If you have enough backup space, simply backup the whole
is safe bet even if it includes some files you don’t want.
The following sections describe in detail what you should back up and what you
Dumped data for backups¶
Weblate dumps various data here, and you can include these files for more complete backups. The files are updated daily (requires a running Celery beats server, see Background tasks using Celery). Currently this includes:
- Translation memory dump, in JSON format.
Version control repositories¶
The version control repositories contain a copy of your upstream repositories with Weblate changes. If you have push on commit enabled for all your translation components, all Weblate changes are included upstream and you do not have to backup the repositories on the Weblate side. They can be cloned again from the upstream locations with no data loss.
SSH and GPG keys¶
If you are using SSH or GPG keys generated by Weblate, you should back up these locations, otherwise you will loose the private keys and you will have to regenerate new ones.
User uploaded files¶
You should back up user uploaded files (e.g. Visual context for strings).
It is recommended to back up this content using
dump_memory in JSON-, instead of binary format, as that
might eventually change (and is also incompatible going from Python 2 to Python 3).
Weblate prepares this dump daily, see Dumped data for backups.
The Celery tasks queue might contain some info, but is usually not needed for a backup. At most your will loose updates that have not yet ben processed to translation memory. It is recommended to perform the fulltext or repository updates upon restoring anyhow, so there is no problem in losing these.