diff --git a/slapd-cli b/slapd-cli index 9fa5cd2..cd4287f 100755 --- a/slapd-cli +++ b/slapd-cli @@ -349,8 +349,10 @@ display_usage() { printf "%s\n" " - ${bold}reindex${normal}: index or reindex database" printf "%s\n" " - ${bold}backup${normal}: backup the data" printf "%s\n" " - ${bold}restore${normal}: restore the data" + printf "%s\n" " - ${bold}hotrestore${normal}: restore the data without stopping / starting slapd (use with caution)" printf "%s\n" " - ${bold}backupconfig${normal}: backup the configuration" printf "%s\n" " - ${bold}restoreconfig${normal}: restore the configuration" + printf "%s\n" " - ${bold}hotrestoreconfig${normal}: restore the configuration without stopping / starting slapd (use with caution)" printf "%s\n" " - ${bold}checksync${normal}: check the synchronization state of the current instance to every provider found in configuration" printf "%s\n" " - ${bold}importflatconfigtemplate${normal}: import the flat template configuration file, after setting the variables" printf "%s\n" " - ${bold}importldifconfigtemplate${normal}: import the ldif template configuration file, after setting the variables" @@ -2193,6 +2195,10 @@ case $1 in start_slapd ;; + hotrestore) + restore + ;; + backupconfig) backupconfig removeoldconfigbackups @@ -2205,6 +2211,11 @@ case $1 in start_slapd ;; + hotrestoreconfig) + restoreconfig + configtest + ;; + checksync) check_sync ;; diff --git a/slapd-cli-prompt b/slapd-cli-prompt index aaa873b..2e8b45e 100644 --- a/slapd-cli-prompt +++ b/slapd-cli-prompt @@ -4,7 +4,7 @@ _slapd-cli() COMPREPLY=() CUR="${COMP_WORDS[COMP_CWORD]}" PREV="${COMP_WORDS[COMP_CWORD-1]}" - ACTIONS="start stop forcestop restart debug force-restart status configtest reindex backup restore backupconfig restoreconfig checksync importflatconfigtemplate importldifconfigtemplate convertconfig buildconfigtemplate importdatatemplate lloadstart lloadstop lloadstatus removeoldbackups" + ACTIONS="start stop forcestop restart debug force-restart status configtest reindex backup restore hotrestore backupconfig restoreconfig hotrestoreconfig checksync importflatconfigtemplate importldifconfigtemplate convertconfig buildconfigtemplate importdatatemplate lloadstart lloadstop lloadstatus removeoldbackups" if [[ ${COMP_WORDS[*]} == *"convertconfig"* ]] || [[ ${COMP_WORDS[*]} == *"buildconfigtemplate"* ]] ; then