Actualizar Weblate¶
Docker image upgrades¶
The official Weblate Docker image (see Instalar con Docker) integrates all upgrade steps. Typically, no manual interaction is needed beyond pulling the latest (or at least newer) version.
Ver también
Instrucciones de actualización genéricas¶
Always look for new changes to Requisitos de software before upgrading.
Once all requirements are installed or upgraded, ensure your
settings.py matches the changes in the configuration (consult
settings_example.py for correct values).
Consulte siempre las Instrucciones específicas de versión antes de actualizar. Si se salta alguna versión, asegúrese de seguir las instrucciones de todas las versiones que se salte durante dicha actualización. A veces es mejor actualizar gradualmente a una versión intermedia para garantizar una migración sin problemas. ¡La actualización a varias versiones debería funcionar, pero no está tan probada como las actualizaciones a una única versión!
Nota
Always back up the full database before upgrading, so that you can roll back the database if the upgrade fails, see Respaldar y trasladar Weblate.
Stop the WSGI and Celery processes to avoid old processes running while upgrading. Otherwise incompatible changes in the database might occur.
Versión nueva de Weblate
For pip installs it can be achieved by:
uv pip install -U "weblate[all]==version"
Or, if you just want to get the latest released version:
uv pip install -U "weblate[all]"
If you don’t want to install all of the optional dependencies do:
uv pip install -U weblate
Using Git checkout, you need to fetch new source code and update your installation:
cd weblate-src git pull # Update Weblate inside your virtualenv . ~/weblate-env/bin/uv pip install -e '.[all]' # Install dependencies directly when not using virtualenv uv pip install --upgrade -e . # Install optional dependencies directly when not using virtualenv uv pip install --upgrade -e '.[all]'
New Weblate releases might have new Dependencias de Python, check if they cover the features you want.
Upgrade the configuration file by following either
settings_example.py, or Instrucciones específicas de versión.Modernizó la base de datos:
weblate migrate --noinput
Collect updated static files (see Ejecutar servidor and Sirviendo archivos estáticos):
weblate collectstatic --noinput --clear
Compress JavaScript and CSS files (optional, see Comprimir bienes cliente):
weblate compressSi está ejecutando una instalación desde Git, también debe regenerar los archivos de configuración regional cada vez que actualice. Puede hacerlo invocando:
weblate compilemessagesVerify that your setup is sane (see also Puesta en marcha de entorno de producción):
weblate check --deploy
Reinicie el trabajador Celery (consulte Tareas en segundo plano con Celery).
Instrucciones específicas de versión¶
Distinto en la versión 5.0: Version specific instructions are now included in the release notes, see Weblate 5.15.1.
Se modernizó una versión mayor más antigua¶
Upgrades across major versions are not supported. Always upgrade to the latest patch level for the initial major release. Upgrades skipping this step are not supported and will break.
If you are upgrading from the 2.x release, always first upgrade to 3.0.1.
If you are upgrading from the 3.x release, always first upgrade to 4.0.4.
If you are upgrading from the 4.x release, always first upgrade to 5.0.2.
Migrating from other databases to PostgreSQL¶
If you are running Weblate with a different database than PostgreSQL, consider migrating to PostgreSQL for better performance by doing the following steps. Remember to stop both, the web and Celery servers beforehand, otherwise you might end up with inconsistent data.
Crear una base de datos en PostgreSQL¶
Suele ser una buena idea ejecutar Weblate en su propia base de datos, y una cuenta de usuario separada:
# If PostgreSQL was not installed before, set the main password
sudo -u postgres psql postgres -c "\password postgres"
# Create a database user called "weblate"
sudo -u postgres createuser -D -P weblate
# Create the database "weblate" owned by "weblate"
sudo -u postgres createdb -E UTF8 -O weblate weblate
Migrar a PostgreSQL con pgloader¶
The pgloader is a generic migration tool to migrate data to PostgreSQL. You can use it to migrate your Weblate database.
Adjust your
settings.pyto use PostgreSQL as database.Migrate the schema in the PostgreSQL database:
weblate migrate weblate sqlflush | weblate dbshell
3. Run the pgloader to transfer the data. The following script can be used to migrate the database, but you might want to learn more about pgloader to better understand what it does, and tweak it to match your setup:
LOAD DATABASE FROM mysql://weblate:password@localhost/weblate INTO postgresql://weblate:password@localhost/weblate WITH include no drop, truncate, create no tables, create no indexes, no foreign keys, disable triggers, reset sequences, data only ALTER SCHEMA 'weblate' RENAME TO 'public' ;
Migrar de Pootle¶
Como Weblate fue escrito originalmente como un sustituto de Pootle, está mantenido para migrar las cuentas de usuario desde éste. Puede volcar los usuarios desde Pootle e importarlos mediante importusers.