This script automates the import of ArchiveBox snapshots into a Linkwarden instance by directly executing SQL against the Postgres database and arranging the archived files into Linkwarden's expected directory structure. Just make sure to have a backup of your Linkwarden database before running this script just in case.
It handles two connection modes:
- Docker mode: Executes
psql
inside a running Postgres container viadocker exec
, specified by the--postgres-container-id
flag.