convertSessions1p
A tool to convert lemonldap::ng sessions between storage backends.
Usage
convertSession [-di]
[-r
oldkey=newkey]
-c
parameters.ini
Overview
convertConfig is a command line tool to migrate all sessions stored in a source backend (sessions_from), into a new backend (sessions_to).
It requires a special configuration file in which you must list the source and destination backend modules and parameters.
Sessions will not be deleted from the source backend. Existing sessions in the destination backend will be kept, unless they have the same session ID as a session in the source backend. In that case, the source will overwrite the destination.
Options
-
--config,-c -
Specify configuration file
-
--debug,-d -
Turns on debugging information
-
--ignore-errors,-i -
Skip to the next session if converting a session fails
-
--rename oldkey=newkey,-r oldkey=newkey -
Rename key names when migrating from one backend to the next.
This option can be specified multiple times
Configuration file format
The configuration file needs two sections to describe the source and destination backends
Here is an example
[sessions_from]storageModule = Apache::Session::FilestorageModuleOptions = { \'Directory' => '/var/lib/lemonldap-ng/sessions', \'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock', \}# Only migrate some session types# sessionKind = Persistent, SSO[sessions_to]storageModule = Apache::Session::Browseable::PostgresstorageModuleOptions = { \'DataSource' => 'DBI:Pg:database=lemonldapdb;host=pg.example.com', \'UserName' => 'lemonldaplogin', \'Password' => 'lemonldappw', \'Commit' => 1, \'Index' => 'ipAddr _whatToTrace user', \'TableName' => 'sessions', \}
The "sessionKind" parameter may be used to filter only some session types.
Thanks to this, you can use this script to migrate from one database holding all your sessions to separate tables from each session type.
Bug report
Use OW2 system to report bug or ask for features: <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
Download
Lemonldap::NG is available at <https://lemonldap-ng.org/download>
Releases
3 releases since Debian 11 (Bullseye); the text changed 2 times.
--config since Debian 12 (Bookworm);
--debug since Debian 12 (Bookworm);
--ignore-errors since Debian 12 (Bookworm);
--rename since Debian 12 (Bookworm);
-c since Debian 12 (Bookworm);
-d since Debian 12 (Bookworm);
-i since Debian 12 (Bookworm);
-r since Debian 12 (Bookworm).