{% extends "admin/dbs/wiki/_layout.html" %} {% block wiki %}

Upgrading

One command tells you what this project still needs, and does the parts that are safe to do automatically:

python manage.py dbs upgrade

It applies pending DBS migrations and refreshes the shipped AI instructions itself. Anything that means editing your own code it prints, with the exact line and where it goes. It never rewrites your settings.

In CI

python manage.py dbs upgrade --check

Changes nothing, exits non-zero when something is outstanding.

Old backups

python manage.py dbs upgrade --backups /var/backups/myproject

Every backup written by any released DBS is at container format version 1, which this version reads, so today this reports nothing to convert. It exists so that a future format change cannot strand files that already exist.

When a backup cannot be read forward, the command stops and changes nothing. It never deletes, moves or overwrites a backup: a conversion writes a new .converted file beside the original and validates it end to end before counting it. The message names the safe option first — install the version that wrote the file in a separate environment and restore from there.

Accepting that a backup is unreadable is deliberately hard to do by accident: there is no flag for it, it needs an interactive terminal, and it needs an exact typed phrase naming how many backups you are giving up. Even then nothing is deleted.

From 0.2.x

  1. pip install --upgrade django-dbs
  2. python manage.py dbs upgrade

That applies the migrations 0.3.0 added and reports anything else. Existing backups restore unchanged, and the original dbs_backup and friends keep working.

{% endblock %}