.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "CONVERTSESSIONS 1p" .TH CONVERTSESSIONS 1p 2024-02-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME convertSessions \- A tool to convert Lemonldap::NG sessions between storage backends. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& convertSession [\-di] [\-r oldkey=newkey ] \-c parameters.ini .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" convertConfig is a command line tool to migrate all sessions stored in a source backend (sessions_from), into a new backend (sessions_to). .PP It requires a special configuration file in which you must list the source and destination backend modules and parameters. .PP 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. .SH OPTIONS .IX Header "OPTIONS" .IP \fB\-\-config\fR,\fB\-c\fR 4 .IX Item "--config,-c" Specify configuration file .IP \fB\-\-debug\fR,\fB\-d\fR 4 .IX Item "--debug,-d" Turns on debugging information .IP \fB\-\-ignore\-errors\fR,\fB\-i\fR 4 .IX Item "--ignore-errors,-i" Skip to the next session if converting a session fails .IP "\fB\-\-rename oldkey=newkey\fR,\fB\-r oldkey=newkey\fR" 4 .IX Item "--rename oldkey=newkey,-r oldkey=newkey" Rename key names when migrating from one backend to the next. .Sp This option can be specified multiple times .SH "CONFIGURATION FILE FORMAT" .IX Header "CONFIGURATION FILE FORMAT" The configuration file needs two sections to describe the source and destination backends .PP Here is an example .PP .Vb 8 \& [sessions_from] \& storageModule = Apache::Session::File \& storageModuleOptions = { \e \& \*(AqDirectory\*(Aq => \*(Aq/var/lib/lemonldap\-ng/sessions\*(Aq, \e \& \*(AqLockDirectory\*(Aq => \*(Aq/var/lib/lemonldap\-ng/sessions/lock\*(Aq, \e \& } \& # Only migrate some session types \& # sessionKind = Persistent, SSO \& \& [sessions_to] \& storageModule = Apache::Session::Browseable::Postgres \& storageModuleOptions = { \e \& \*(AqDataSource\*(Aq => \*(AqDBI:Pg:database=lemonldapdb;host=pg.example.com\*(Aq, \e \& \*(AqUserName\*(Aq => \*(Aqlemonldaplogin\*(Aq, \e \& \*(AqPassword\*(Aq => \*(Aqlemonldappw\*(Aq, \e \& \*(AqCommit\*(Aq => 1, \e \& \*(AqIndex\*(Aq => \*(AqipAddr _whatToTrace user\*(Aq, \e \& \*(AqTableName\*(Aq => \*(Aqsessions\*(Aq, \e \& } .Ve .PP The \f(CW\*(C`sessionKind\*(C'\fR parameter may be used to filter only some session types. .PP Thanks to this, you can use this script to migrate from one database holding all your sessions to separate tables from each session type. .SH "SEE ALSO" .IX Header "SEE ALSO" .SH AUTHORS .IX Header "AUTHORS" .IP "Maxime Besson, " 4 .IX Item "Maxime Besson, " .SH "BUG REPORT" .IX Header "BUG REPORT" Use OW2 system to report bug or ask for features: .SH DOWNLOAD .IX Header "DOWNLOAD" Lemonldap::NG is available at