Skip to content

Commit

Permalink
provide hotrestore and hotrestore-config features (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcoutadeur committed May 24, 2024
1 parent 26ef110 commit 410a1ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions slapd-cli
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -2193,6 +2195,10 @@ case $1 in
start_slapd
;;

hotrestore)
restore
;;

backupconfig)
backupconfig
removeoldconfigbackups
Expand All @@ -2205,6 +2211,11 @@ case $1 in
start_slapd
;;

hotrestoreconfig)
restoreconfig
configtest
;;

checksync)
check_sync
;;
Expand Down
2 changes: 1 addition & 1 deletion slapd-cli-prompt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 410a1ad

Please sign in to comment.