.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 "2023-05-13" "perl v5.32.1" "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 \s-1ID\s0 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 \s-1OW2\s0 system to report bug or ask for features: .SH "DOWNLOAD" .IX Header "DOWNLOAD" Lemonldap::NG is available at