.TH "md_doc_help_kdb-import" 3elektra "Sun May 29 2016" "Version 0.8.14" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME md_doc_help_kdb-import \- kdb-import(1) -- Import an existing configuration into the key database \fCkdb import []\fP .PP Where \fCdestination\fP is the destination where the user want's the keys to be imported into and \fCformat\fP is the format the current keys or configuration is stored in\&. If the \fCformat\fP argument is not passed, then the default format will be used as determined by the value of the \fCsw/kdb/current/format\fP key\&. By default, that key is set to the \fCdump\fP format\&. The \fCformat\fP 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\&. .PP .SS "DESCRIPTION" .PP This command allows a user to import an existing configuration into the key database\&. The configuration that the user wants to import is read from \fCstdin\fP\&. The user should specify the format that the current configuration or keys are in, otherwise the default format will be used\&. The default format is \fCdump\fP but can be changed by editing the value of the \fCsw/kdb/current/format\fP key\&. .PP .SS "CONFLICTS" .PP Conflicts can occur when importing a configuration to a part of the database where keys already exist\&. Conflicts when importing can be resolved using a \fCstrategy\fP with the \fC-s\fP argument\&. .PP .SS "STRATEGIES" .PP Currently the following strategies exist for importing configurations: .PP .IP "\(bu" 2 \fCcut\fP: Removes existing keys below \fCdestination\fP and repalces them with the keys resulting from the import\&. This is the default strategy\&. .IP "\(bu" 2 \fCimport\fP: Preserves existing keys below \fCdestination\fP only if they do not exist in the keys being imported\&. If the key does exist in the imported keys, the current version will be overwritten\&. .PP .PP .SS "OPTIONS" .PP .IP "\(bu" 2 \fC-H\fP, \fC--help\fP: Show the man page\&. .IP "\(bu" 2 \fC-V\fP, \fC--version\fP: Print version info\&. .IP "\(bu" 2 \fCs\fP, \fC--strategy \fP: Specify which strategy should be used to resolve conflicts\&. .IP "\(bu" 2 \fC-v\fP, \fC--verbose\fP: Explain what is happening\&. .PP .PP .SS "EXAMPLES" .PP To import a configuration stored in the XML format in a file called \fCexample\&.xml\fP below \fCuser/keyset\fP: \fCkdb import user/keyset xmltool < example\&.xml\fP .PP To import a configuration stored in the \fCini\fP format in a file called \fCexample\&.ini\fP below \fCuser/keyset\fP replacing any previous keys stored there: \fCcat example\&.ini | kdb import -s cut user/keyset ini\fP .PP To import a configuration stored in the \fCini\fP format in a file called \fCexample\&.ini\fP below \fCuser/keyset\fP keeping any previous keys stored there that aren't present in the newly imported configuration: \fCcat example\&.ini | kdb import -s import user/keyset ini\fP .PP To restore a backup (stored as \fCsw\&.ecf\fP) of a user's configuration below \fCsystem/sw\fP: \fCcat sw\&.ecf | kdb import system/sw\fP .PP .SS "SEE ALSO" .PP .IP "\(bu" 2 \fBelektra-merge-strategies(7)\fP .PP