Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ body:
attributes:
label: ALPR Community version
description: Find this under Settings → Release. Include the source revision there when reporting an installation or update problem.
placeholder: v0.1.55
placeholder: v0.1.56
validations:
required: true

Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,31 @@ jobs:
- name: Verify runtime-only image contents
run: node scripts/verify-runtime-image.mjs alpr-ci:${{ github.sha }}

docker-migration-export:
name: Docker source export and portable Windows backup
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: 24
- name: Install locked export dependencies
run: yarn install --frozen-lockfile --ignore-scripts
- name: Export isolated Original PostgreSQL 13 and 17 sources
env:
ALPR_DOCKER_TEST_OUTPUT: ${{ runner.temp }}/docker-migration-bundle
run: node scripts/test-docker-migration-export.mjs
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: synthetic-docker-migration-bundle
path: ${{ runner.temp }}/docker-migration-bundle
retention-days: 7

windows-native:
needs: docker-migration-export
name: Native Windows preview
runs-on: windows-2022
timeout-minutes: 30
Expand All @@ -360,6 +384,14 @@ jobs:
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: Download synthetic Linux Docker export for real Windows restore
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: synthetic-docker-migration-bundle
path: ${{ runner.temp }}/docker-migration-bundle
- name: Set portable backup fixture path
shell: pwsh
run: Add-Content -LiteralPath $env:GITHUB_ENV -Value "ALPR_DOCKER_TEST_BUNDLE=$env:RUNNER_TEMP/docker-migration-bundle"
- name: Use a canonical disposable fixture directory
shell: pwsh
run: |
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 0.1.56 — 2026-10-21

- Export the original Docker ALPR database from Windows Setup before creating a
native installation. Select the source application/database explicitly and
review the recognized source profile, PostgreSQL version and plate-read count.
- Export Docker sources on Linux with `./alpr-community migrate export-docker`
and copy the same verified portable folder to native Windows.
- Preserve source database volumes and ports, use read-only database sessions,
verify logical dump counts plus images/settings/authentication, and restore
the selected source application's prior running/stopped state.
- Refuse conflicting database settings, changed source data, overwritten backups
and populated import targets. Imports do not merge old and new histories.
- Wait through temporary systemd user-bus permissions during Linux update-helper
startup, within the existing readiness timeout.
- Update User Guide 3.24, migration/install instructions and the product roadmap
to distinguish native backups from Docker exports and preserve newer records.


## 0.1.55 — 2026-10-07

- Change the private native Windows PostgreSQL port later under Settings →
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ technical details and recovery.
For Docker-to-native migration on the same Windows computer, keep Docker on
port 3000 and choose an unused application port such as 3001 in Windows Setup.
Native Community uses a separate PostgreSQL 17 database, normally on loopback
port 5433. The [Windows migration and port guide](docs/WINDOWS_INSTALL.md#keep-docker-alpr-while-verifying-native-windows)
port 5433. First [export the original Docker database](docs/DOCKER_TO_WINDOWS_MIGRATION.md)
on its Windows or Linux source host; the native Windows backup shortcut does
not export Docker. The [Windows migration and port guide](docs/WINDOWS_INSTALL.md#keep-docker-alpr-while-verifying-native-windows)
explains backup, verification and changing either the application or PostgreSQL port later under Settings → General.

### Linux
Expand Down
4 changes: 4 additions & 0 deletions alpr-community
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ fi

if [[ "${1:-}" == "migrate" ]]; then
shift
if [[ "${1:-}" == "export-docker" ]]; then
shift
exec "${node_binary}" "${installation_dir}/scripts/docker-migration-interactive.mjs" "$@"
fi
if [[ "${1:-}" == "wizard" ]]; then
shift
exec "${node_binary}" "${installation_dir}/scripts/community-migration-wizard.mjs" "$@"
Expand Down
18 changes: 17 additions & 1 deletion docs/COMMUNITY_PRODUCT_ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# Community product roadmap

Last reviewed: October 7, 2026
Last reviewed: October 21, 2026

## Docker-to-Windows migration export

Community v0.1.56 adds source-selecting export for Original/Community Docker
installations on Windows and Linux. Windows Setup exposes export before native
installation; Linux uses `./alpr-community migrate export-docker`. Both produce
the same verified logical backup, with source profile/record-count review, image
and authentication preservation, and restoration of the selected app's original
running state. Native imports continue to require an empty target and do not
merge histories. See [migration procedure](DOCKER_TO_WINDOWS_MIGRATION.md).

Automated validation covers Original PostgreSQL 13/17 and Community PostgreSQL 17
Docker exports, named volumes and bind mounts, and a Linux-created backup restored
into native Windows PostgreSQL. The Windows graphical exporter compiles, but a
real Windows Docker Desktop source export remains a field-test limitation.
GitHub Releases records publication and the exact release assets.

## Native Windows is available

Expand Down
127 changes: 127 additions & 0 deletions docs/DOCKER_TO_WINDOWS_MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Move Docker ALPR data to native Windows

Use this procedure for either **Docker Desktop on Windows** or **Docker on
Linux**, with an Original ALPR v0.1.9-compatible database or Community v0.1.20+
on PostgreSQL 13 or 17. It creates the same verified folder that Windows Setup
imports. Do not update, replace or delete the old Docker database to export it.

These controls are available in Community v0.1.56 and later. Older releases,
including v0.1.55, do not include this graphical Docker exporter.

## Choose the correct backup tool

| Source | Export tool |
| --- | --- |
| Original or Community in Docker Desktop on Windows | Setup → Move an existing ALPR database and images → **Back up original Docker ALPR…** |
| Original or Community in Docker on Linux | On the Linux source host, from a prepared current Community checkout: `./alpr-community migrate export-docker` |
| Native Windows Community | Windows Start → **ALPR Migration Backup** |
| Linux PostgreSQL outside Docker | The advanced [Linux portable backup procedure](WINDOWS_NATIVE.md#create-the-backup-on-linux), using its actual endpoint and image paths |

The native Windows backup shortcut exports the native database only. Installing
an empty Community database and using that shortcut does **not** export the old
Docker database.

## Docker Desktop on Windows

1. Run Docker Desktop as the Windows account that owns the original installation.
Keep it in Linux-container mode. Keep the original application, PostgreSQL
container and all their volumes.
2. Open the new Windows Setup. Select **Move an existing ALPR database and
images**, then **Back up original Docker ALPR…**. Export is available before
installing Community; you do not need a temporary empty installation.
3. Select the old Docker application and its PostgreSQL container by name and
image. The tool checks that the selected database matches the application's
configured Docker network address. It never selects the native Windows service.
4. Select **Review source**. Check the source application type, PostgreSQL version
and **plate-read count**. If the count is zero and you expected historical
records, cancel and select the correct source. Unknown or incomplete schemas
stop the export.
5. Pause Blue Iris ingestion and other jobs or applications that write to this
database or image storage. Keep ingestion paused until the Windows import has
been verified.
Confirm the displayed source and choose a private local backup location.
The tool stops only the selected Docker ALPR application, makes and verifies
its logical dump, images, settings and authentication, then restarts it if it
was running. An already stopped application stays stopped.
6. Wait for **Docker backup complete**. The installer selects the resulting
folder automatically. Keep the entire folder, including `migration-backup.json`.
A failure preserves source data and any partial export; keep the diagnostic
folder. A partial export is not a usable migration backup.
7. Keep ingestion on the old source paused through import and verification.
The exporter restarts the app but does not control Blue Iris senders; Setup's
confirmation is deliberately reset. If ingestion resumed after export, create
a fresh export for cutover so later reads are included. Continue below.

The tool uses PostgreSQL 17 client containers and may download the matching
official image. It connects within the selected database container's network
namespace using read-only database sessions. It does not publish a database port
or copy the physical PostgreSQL cluster. Docker's original ports and volumes
remain unchanged. Keep Docker running until export completes.

After installation, **ALPR Docker Migration Backup** in Windows Start opens the
same Docker exporter. The older **ALPR Migration Backup** shortcut clearly
identifies itself as a native Windows backup.

## Docker on Linux → Windows

1. On the Linux computer that owns the Docker containers, prepare a separate
current Community checkout with its locked dependencies and Node.js 24
(or use an existing current Community checkout). This prepares the exporter;
it does not replace the old running application. Use the normal account with
access to that Docker engine.
2. From that checkout run:

```bash
./alpr-community migrate export-docker
```

3. Select the original application and database from the numbered lists. Enter
an absolute path to a private local backup directory. Review the displayed
source type and plate-read count.
4. Pause Blue Iris ingestion and every other database/image writer, then type
the confirmation shown by
the exporter. The selected source application is briefly stopped and returned
to its original running/stopped state. Wait for the verified backup path.
5. Copy the **entire completed backup folder** from Linux to Windows using your
normal protected file transfer. Include hidden files and all manifests.
Never copy `/var/lib/postgresql/data` into the Windows database directory.
6. Keep old-source ingestion paused until import is verified. If it resumed,
export again before cutover to include later reads. In Windows Setup select
**Move an existing ALPR database and images**, browse to the copied folder
containing `migration-backup.json`, and continue below.

## Import and verify

Use a **fresh, empty native Windows target**. Keep Docker's application port
unchanged; if it uses 3000 on the same Windows computer, choose 3001 for native
Community. Normally keep the separate native database at 5433.

Setup verifies checksums, source schema, exact pre-upgrade table counts, migrated
records and referenced image files before starting the application. Review
integration destinations and then verify sign-in, historical records, tags,
representative images, settings and one controlled new read. Only then change
the intended Blue Iris destination to the new application address. A migrated
authentication file preserves the ingestion API key; otherwise obtain the new
key in Settings → Security. The setup administrator uses the password selected
during Setup. Windows creates separate protected PostgreSQL credentials.

Keep the original installation and completed backup until the move is accepted.
The two databases are independent after export; later records are not synchronized.

## If Community already contains new records

**Do not delete or reinstall it to make room for an import.** First make a
separate native Community backup and keep the original Docker export. The
importer refuses a populated target and does not merge old and new histories.
Use another clean Windows computer/VM to verify the old history, or plan a
replacement with the maintainer while retaining both datasets and backups.

## If source review fails

Keep the exact displayed error and container names/images. Do not share Docker
inspection output containing environment variables, passwords, API keys, images
or real plate data publicly. The exporter supports the documented ALPR mounts
`/app/storage`, `/app/config` and `/app/auth`, and a directly associated Docker
PostgreSQL container. External databases, secret-file credentials, renamed
application data paths and unsupported schemas require the advanced procedure
or maintainer help; the exporter does not guess or rewrite them.
2 changes: 1 addition & 1 deletion docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Clone the canonical repository and detach at the exact stable release tag:
```bash
git clone https://github.com/prsmith777/ALPR-Database-Community.git
cd ALPR-Database-Community
git checkout --detach v0.1.55
git checkout --detach v0.1.56
./alpr-community install
```

Expand Down
6 changes: 5 additions & 1 deletion docs/MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ For a native Windows destination, start with the
installer's **Move an
existing ALPR database and images** option and the verified portable backup
described in [Linux-to-Windows migration](WINDOWS_NATIVE.md#cross-platform-import).
The workflow below creates a separate Linux Docker target.
For Docker sources on either Windows or Linux, follow the
[Docker-to-Windows export procedure](DOCKER_TO_WINDOWS_MIGRATION.md). It identifies
the original container/database and creates the import folder; the native Windows
backup shortcut does not export Docker. The workflow below creates a separate
Linux Docker target.

The Community migration wizard moves a supported existing ALPR database and
image library into a separate PostgreSQL 17 Community target. It creates the
Expand Down
6 changes: 3 additions & 3 deletions docs/UPDATES.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ shown on the GitHub Releases page, rather than deploying moving `main`:
```bash
git clone https://github.com/prsmith777/ALPR-Database-Community.git
cd ALPR-Database-Community
git checkout --detach v0.1.55
git checkout --detach v0.1.56
./alpr-community install
```

Expand Down Expand Up @@ -88,7 +88,7 @@ alpr_native_update() (
set -Eeuo pipefail
download_dir="$(mktemp -d /tmp/alpr-maintenance-download.XXXXXX)"
trap 'rm -rf -- "$download_dir"' EXIT
asset_base="https://github.com/prsmith777/ALPR-Database-Community/releases/download/v0.1.55"
asset_base="https://github.com/prsmith777/ALPR-Database-Community/releases/download/v0.1.56"
curl -fLsS --retry 3 "$asset_base/community-maintenance.sh" -o "$download_dir/community-maintenance.sh"
curl -fLsS --retry 3 "$asset_base/community-maintenance.sh.sha256" -o "$download_dir/community-maintenance.sh.sha256"
(cd "$download_dir" && sha256sum --check --strict community-maintenance.sh.sha256)
Expand All @@ -99,7 +99,7 @@ unset -f alpr_native_update
```

The launcher verifies the canonical repository and exact released tag, loads the
fixed tools outside your checkout, and asks for **INSTALL v0.1.55**. It uses the
fixed tools outside your checkout, and asks for **INSTALL v0.1.56**. It uses the
same guarded backup/install workflow and does not reset or reinstall your system.
It temporarily stops only this installation's matching per-user systemd update
agent, then restarts it with the installed code. Keep the terminal open and do
Expand Down
13 changes: 13 additions & 0 deletions docs/WINDOWS_INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ The current installer is unsigned, so Windows may identify an unknown publisher.
Use the official release and its checksum. If antivirus blocks a file, retain
the product's warning and the exact filename for support; keep antivirus enabled.

## Export an existing Docker database first

For Docker Desktop on Windows, choose **Move an existing ALPR database and images**,
then **Back up original Docker ALPR…** on the migration page. Review the selected
Docker source and record count before exporting. You do not need to install an
empty Community database first. The ordinary **ALPR Migration Backup** shortcut
exports native Windows Community only.

For Docker on Linux, run **./alpr-community migrate export-docker** from a prepared
current Community checkout on the source host, then copy the entire verified
folder to Windows. See [Docker-to-Windows migration](DOCKER_TO_WINDOWS_MIGRATION.md)
for both scenarios and handling a native installation that already contains records.

## Keep Docker ALPR while verifying native Windows

On the same Windows computer, keep Docker's web/API mapping at 3000 and choose
Expand Down
6 changes: 6 additions & 0 deletions docs/WINDOWS_NATIVE.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ Windows-invalid filenames, changed backups, and existing destination data are
refused. Copy the entire completed folder to Windows, including the manifests.
Do not copy PostgreSQL's physical data directory between operating systems.

For Docker sources on Windows or Linux, prefer the
[Docker source exporter](DOCKER_TO_WINDOWS_MIGRATION.md). It displays the source
profile and record count and produces this verified bundle without requiring a
native Windows installation first. The advanced endpoint procedure below remains
available for non-Docker Linux sources.

### Create the backup on Linux

This step is performed by the source administrator. Keep the original database
Expand Down
Loading
Loading