Files
mikrotik-backup/docs/data-migration.md
T
2026-10-28 14:55:35 +01:00

1.0 KiB

Data migration

Version 0.0.2 performs automatic, transactional schema migration for supported Rust databases. A database created by Rust 0.0.1 uses schema v1; on startup 0.0.2 validates it, adds default_routeros_username and default_routeros_password, updates schema_info.schema_version to 2, validates the resulting schema, and then starts the service. No manual sqlite3 command is required.

The automatic migration applies only to the supported Rust schema. It does not convert the previous Python/TypeScript application database. For that source, use the explicit, copy-only import-python command described in data-import.md.

For the standard legacy Python layout:

DATA_DIR="$PWD/storage-imported" \
DATABASE_PATH="$PWD/storage-imported/routeros_backup_next.db" \
./import-python.sh /srv/old-mikrotik-app \
  --database docker-data/db/routeros_backup_next.db \
  --backup-root docker-data

Stop the old Python/TypeScript application first. The import destination must be new and must not contain an existing database.