Upgrading Versions
✅ Upgrading checklist:
Find the version you want to upgrade to on https://github.com/ArchiveBox/ArchiveBox/releases
Read the release notes carefully for any instructions or extra steps around upgrading for each release you're skipping or installing
Make a full backup of your
index.sqlite3
andarchive/
content before upgrading!gzip -9 < index.sqlite3 > "index.sqlite3.$(date +%s).bak"
Follow the steps below depending on your setup to run
archivebox init
(repeating as necessary for each major version if upgrading across multiple major versions)Confirm the upgrade succeeded and check for any orphan/corrupted snapshots with
archivebox status
💬 Open an issue in our bug tracker if you experience any problems with upgrading/merging/modifying collections.
Note: It's recommended to only upgrade one major version at a time. e.g. if you're on v0.4.14
, upgrade to v0.5.6
next, then v0.6.3
, and finally v0.7.1
(as 3 separate steps). You can specify exact versions with pip like so: pip install archivebox==0.6.3
or with docker docker pull archivebox/archivebox:0.6.3
. Upgrading directly across multiple major versions may work in some cases, but is not recommended for maximum data safety.
ℹ️ How it works internally:
The same command is used for initializing a new archive and upgrading an existing one. archivebox init
is indempotent and safely be run multiple times. Running it will ensure your collection is on the latest version and all the files are in their correct locations. archivebox status
can be used to check for orphan/corrupted snapshots or invalid index data.
There are three main areas on disk that ArchiveBox modifies during upgrades:
index.sqlite3
contains the SQLite3 DB index that gets upgraded automatically by Django based on the changes inarchivebox/core/models.py
.archive/*/index.json
these files are redundant json exports of the data for each Snapshot inindex.sqlite3
, these files are overwritten on everyarchivebox update
run or anytime the Snapshot is modified from the GUI or CLI. These files will be lazily updated to the latest schema versions as ArchiveBox accesses them, but are usually not modified in bulk duringarchivebox init
when upgrading.archive/*
the Snapshot output files may be moved or renamed by future upgrades (so far they have remained unchanged since v0.1, but future versions reserve the right to change their locations)
The ArchiveBox.conf
file is not modified by upgrades and should remain forward-compatible across future versions (even when config options are renamed, we check the old names internally to maintain compatibility).
As of v0.4 and above, ArchiveBox uses the Django migrations system for deterministic, atomic, safe upgrades, so your DB should always be left in a consistent state in the event of a failure or power outage. If you need help fixing a corrupted collection, open an issue using the link above.
More info:
https://docs.djangoproject.com/en/4.0/topics/migrations/
https://github.com/ArchiveBox/ArchiveBox/wiki/Upgrading-or-Merging-Archives#database-migrations-errors-or-upgrade-issues
https://github.com/ArchiveBox/ArchiveBox/wiki/Troubleshooting
Upgrading with Docker Compose ⭐️
Using Docker Compose is recommended because it makes upgrading a breeze! ✨ Pulling and running the latest version automatically upgrades the ArchiveBox collection and all of ArchiveBox's internal dependencies.
More info:
https://github.com/ArchiveBox/ArchiveBox#%EF%B8%8F-easy-setup
https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#docker-compose
https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#setup
Upgrading with plain Docker
Upgrading with plain Docker is similar to the process with Docker Compose, but you have to run archivebox init
manually at the end to finish the process.
More info:
https://github.com/ArchiveBox/ArchiveBox#%EF%B8%8F-easy-setup
https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#docker
https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#setup-1
Upgrading with a package manager
Package manager releases take a lot of effort to maintain (contributions welcome!) and sometimes lag behind the Docker releases. We make a best effort to have the latest release available through all channels within a reasonable timeframe.
More info:
https://github.com/ArchiveBox/ArchiveBox#-package-manager-setup
https://github.com/ArchiveBox/ArchiveBox/wiki/Install#manual-setup
https://github.com/ArchiveBox/pip-archivebox
https://github.com/ArchiveBox/homebrew-archivebox
https://github.com/ArchiveBox/docker-archivebox
https://github.com/ArchiveBox/debian-archivebox
https://github.com/ArchiveBox/electron-archivebox
https://aur.archlinux.org/packages/archivebox
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/archivebox/default.nix
Merge two or more existing archives
See [[Merging Collections]]...
Related Documents
https://github.com/ArchiveBox/ArchiveBox/wiki/Troubleshooting#database
https://github.com/ArchiveBox/ArchiveBox/wiki/Usage#disk-layout
https://github.com/ArchiveBox/ArchiveBox/wiki/Usage#large-archives
https://github.com/ArchiveBox/ArchiveBox/wiki/Security-Overview#output-folder
https://github.com/ArchiveBox/ArchiveBox/wiki/Usage#python-shell-usage
https://github.com/ArchiveBox/ArchiveBox/wiki/Usage#sql-shell-usage
Last updated