Skip to content

Commit

Permalink
fix: add missing param
Browse files Browse the repository at this point in the history
  • Loading branch information
serdigital64 committed Aug 1, 2024
1 parent 3f8e5f9 commit 4cbc348
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Linux-Dev
- linux-dev-crypt-mount: add missing parameter
- Restic
- restic-backup-restore: add missing parameter

## [0.7.1]

Expand Down
16 changes: 13 additions & 3 deletions src/restic/restic-backup-restore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#######################################
# Restic / Backup / Restore
#
# Version: 1.0.0
# Version: 2.0.0
#
#######################################
# Copyright [2024] [[email protected]]
Expand Down Expand Up @@ -54,15 +54,25 @@ function initialize() {
declare command='restore'
declare backup_tag="${1:-}"
declare destination="${2:-}"
declare backup_id="${3:-latest}"
declare backup_host="${4:-}"

bl64_dbg_set_level "$SYSOP64_CORE_SET_DEBUG" && bl64_msg_set_level "$SYSOP64_CORE_SET_VERBOSE" || exit $?
initialize || exit $?

bl64_msg_show_batch_start "$command"
bl64_ui_ask_confirmation "Warning: destination content will be replaced (${destination})" &&
bl64_msg_show_info "
Backup Tag : ${backup_tag}
Backup ID : ${backup_id}
Backup Host: ${backup_host}
Destination: ${destination}"

bl64_ui_ask_confirmation 'Warning: destination content will be replaced using absolute paths from backup' &&
restic_lib_run_restic \
--verbose \
--target "$destination" \
--tag "$backup_tag" \
${backup_host:+--host "$backup_host"} \
restore \
"$backup_tag"
"$backup_id"
bl64_msg_show_batch_finish $? "$command"

0 comments on commit 4cbc348

Please sign in to comment.