Files
podman/docs
Matt Heon d420fbfde3 Add migration code for BoltDB to SQLite
This is gated behind a new option in `podman system migrate`,
`--migrate-db`, or by a system restart being performed.

BoltDB support was removed in Podman 6, so we are certain that,
when we start Podman, a SQLite state is in use. However, if we
also detect a valid BoltDB state, we will attempt a migration.

Migration is performed by retrieving all volumes, pods, and
containers (in that order, to ensure there are no dependency
conflicts) from the Bolt database, when adding them to the SQLite
database. If there is a conflict - IE, a container exists in both
SQLite and Bolt - we skip migration for that object. The old DB
is then renamed so we do not try to migrate it again.

Our ability to test complex migration scenarios is limited, but
this should handle simple migrations easily.

This is a heavily adapted version of #27660 rebuilt to work with
Podman 6.0. Substantial changes were required to throw errors
when a BoltDB database is detected and no migration is being
performed. Firstly, for automatic on-reboot migrations, we need
to have a deferred error returned by getDBState (very early in
runtime initialization) that is only acted on much later (once we
know for certain a state refresh is/is not being performed).
The `system migrate --migrate-db` command was much more
problematic. Conceptually, it's not terrible - add a flag to the
runtime to suppress errors, set that flag only when calling the
`system migrate` command with `--migrate-db` - but it unveiled a
serious problem with how we do runtime init (special flags to the
runtime were being ignored because the image runtime set the
Libpod runtime first and had none of the proper handling) which
took a genuinely annoying amount of time to identify and fix.

This cannot be tested automatically, as the ability to create Bolt
databases has been entirely removed with Podman 6.

This also includes 9b810aed3a from
the v5.8 branch by Luap99, which I have had to squash into this
commit to satisfy the build-each-commit check. It was just a
simplification of the SQLite path check.

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2026-05-08 14:07:17 -04:00
..
2024-09-05 09:56:48 -04:00
2017-11-01 11:24:59 -04:00
2022-09-15 14:35:06 -06:00

Podman Documentation

The online man pages and other documents regarding Podman can be found at Read The Docs. The man pages can be found under the Commands link on that page.

Build the Docs

Directory Structure

Directory
Markdown source for man pages docs/source/markdown/
man pages aliases as .so files docs/source/markdown/links/
target for output docs/build
man pages docs/build/man
remote linux man pages docs/build/remote/linux
remote darwin man pages docs/build/remote/darwin
remote windows html pages docs/build/remote/windows

Support files

docs/remote-docs.sh Read the docs/source/markdown files and format for each platform
docs/links-to-html.lua pandoc filter to do aliases for html files
docs/use-pagetitle.lua pandoc filter to set html document title

Manpage Syntax

The syntax for the formatting of all man pages can be found here.

API Reference

The latest online documentation is automatically generated by two cooperating automation systems based on committed upstream source code. Firstly, the Cirrus-CI docs task builds pkg/api/swagger.yaml and uploads it to a public-facing location (Google Storage Bucket - an online service for storing unstructured data). Second, Read The Docs reacts to the github.com repository change, building the content for the libpod documentation site. This site includes for the API section, some javascript which consumes the uploaded swagger.yaml file directly from the Google Storage Bucket.

Since there are multiple systems and local cache is involved, it's possible that updates to documentation (especially the swagger/API docs) will lag by 10-or-so minutes. However, because the client (i.e. your web browser) is fetching content from multiple locations that do not share a common domain, accessing the API section may show a stack-trace similar to the following:

JavaScript Stack Trace Image

If reloading the page, or clearing your local cache does not fix the problem, it is likely caused by broken metadata needed to protect clients from cross-site-scripting style attacks. Please notify a maintainer so they may investigate how/why the swagger.yaml file's CORS-metadata is incorrect, or the file isn't accessible for some other reason.

Local Testing

To build standard man pages, run make docs. Results will be in docs/build/man.

To build HTMLized man pages: Assuming that you have the dependencies installed, then also install (showing Fedora in the example):

$ sudo dnf install python3-sphinx python3-recommonmark
$ pip install sphinx-markdown-tables myst_parser

(The above dependencies are current as of 2022-09-15. If you experience problems, please see requirements.txt in this directory, it will almost certainly be more up-to-date than this README.)

After that completes, cd to the docs directory in your Podman sandbox and then do make html.

You can then preview the html files in docs/build/html with:

python -m http.server 8000 --directory build/html

...and point your web browser at http://localhost:8000/