.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "KDB\-IMPORT" "1" "2015-11-19" "" "" . .SH "NAME" \fBkdb\-import\fR \- Import an existing configuration into the key database . .SH "SYNOPSIS" \fBkdb import []\fR . .P Where \fBdestination\fR is the destination where the user want\'s the keys to be imported into and \fBformat\fR is the format the current keys or configuration is stored in\. . .br If the \fBformat\fR argument is not passed, then the default format will be used as determined by the value of the \fBsw/kdb/current/format\fR key\. By default, that key is set to the \fBdump\fR format\. . .br The \fBformat\fR attribute relies on Elektra\'s plugin system to properly import the configuration\. The user can view all plugins available for use by running the kdb\-list(1) command\. To learn about any plugin, the user can simply use the kdb\-info(1) command\. . .SH "DESCRIPTION" This command allows a user to import an existing configuration into the key database\. . .br The configuration that the user wants to import is read from \fBstdin\fR\. . .br The user should specify the format that the current configuration or keys are in, otherwise the default format will be used\. . .br The default format is \fBdump\fR but can be changed by editing the value of the \fBsw/kdb/current/format\fR key\. . .SH "CONFLICTS" Conflicts can occur when importing a configuration to a part of the database where keys already exist\. . .br Conflicts when importing can be resolved using a \fIstrategy\fR with the \fB\-s\fR argument\. . .SH "STRATEGIES" Currently the following strategies exist for importing configurations: . .TP \fBcut\fR Removes existing keys below \fBdestination\fR and repalces them with the keys resulting from the import\. . .br This is the default strategy\. . .TP \fBimport\fR Preserves existing keys below \fBdestination\fR only if they do not exist in the keys being imported\. . .br If the key does exist in the imported keys, the current version will be overwritten\. . .SH "OPTIONS" . .TP \fB\-H\fR, \fB\-\-help\fR Show the man page\. . .TP \fB\-V\fR, \fB\-\-version\fR Print version info\. . .TP \fBs\fR, \fB\-\-strategy \fR Specify which strategy should be used to resolve conflicts\. . .TP \fB\-v\fR, \fB\-\-verbose\fR Explain what is happening\. . .SH "EXAMPLES" To import a configuration stored in the XML format in a file called \fBexample\.xml\fR below \fBuser/keyset\fR: . .br \fBkdb import user/keyset xmltool < example\.xml\fR . .P To import a configuration stored in the \fBini\fR format in a file called \fBexample\.ini\fR below \fBuser/keyset\fR replacing any previous keys stored there: . .br \fBcat example\.ini | kdb import \-s cut user/keyset ini\fR . .P To import a configuration stored in the \fBini\fR format in a file called \fBexample\.ini\fR below \fBuser/keyset\fR keeping any previous keys stored there that aren\'t present in the newly imported configuration: . .br \fBcat example\.ini | kdb import \-s import user/keyset ini\fR . .P To restore a backup (stored as \fBsw\.ecf\fR) of a user\'s configuration below \fBsystem/sw\fR: . .br \fBcat sw\.ecf | kdb import system/sw\fR . .SH "SEE ALSO" . .IP "\(bu" 4 elektra\-merge\-strategies(7) \fIelektra\-merge\-strategies\fR . .IP "" 0