restic-automatic-backup-scheduler icon indicating copy to clipboard operation
restic-automatic-backup-scheduler copied to clipboard

Extra args

Open nettnikl opened this issue 2 years ago • 7 comments

nettnikl avatar Oct 14 '23 21:10 nettnikl

Thanks

@ggzica can you confirm that the bug in https://github.com/erikw/restic-automatic-backup-scheduler/issues/120 doesn’t appear with this PR?

erikw avatar Oct 20 '23 11:10 erikw

Thanks

@ggzica can you confirm that the bug in #120 doesn’t appear with this PR?

Hey, Sorry i'm not very good with switching to PRs? What's the # of the PR? I tried gh pr checkout 120 but got an error that could not retrieve

ggzica avatar Oct 20 '23 12:10 ggzica

122 is the PR number, check the URL of this page

erikw avatar Oct 20 '23 12:10 erikw

oh, had no idea, checking it now!

ggzica avatar Oct 20 '23 12:10 ggzica

Same issue, gets backed up then deleted.. image image

ggzica avatar Oct 20 '23 12:10 ggzica

Well, thanks for testing. But tbh, i dont understand how - the array is not empty anymore. Did you put the env you are using on the old ticket? Could you set "set -x" in the beginning of the script to print the commands out, and see what the command looks like that is the troublemaker?

nettnikl avatar Oct 20 '23 12:10 nettnikl

Well, thanks for testing. But tbh, i dont understand how - the array is not empty anymore. Did you put the env you are using on the old ticket? Could you set "set -x" in the beginning of the script to print the commands out, and see what the command looks like that is the troublemaker?

Yes, Steps i did:

  1. I copied the env files to a different folder
  2. Ran a make uninstall
  3. Checked out the PR 122
  4. Ran a make install-systemd
  5. Copied back env files Copied in Step 1.

set-x of the script

+ set -o errexit
+ set -o pipefail
+ [[ 0 =~ ^1|t|y|true|yes$ ]]
+ trap exit_hook INT TERM
+ assert_envvars RESTIC_BACKUP_PATHS RESTIC_BACKUP_TAG RESTIC_BACKUP_EXCLUDE_FILE RESTIC_BACKUP_EXTRA_ARGS RESTIC_REPOSITORY RESTIC_VERBOSITY_LEVEL RESTIC_RETENTION_HOURS RESTIC_RETENTION_DAYS RESTIC_RETENTION_MONTHS RESTIC_RETENTION_WEEKS RESTIC_RETENTION_YEARS
+ varnames=('RESTIC_BACKUP_PATHS' 'RESTIC_BACKUP_TAG' 'RESTIC_BACKUP_EXCLUDE_FILE' 'RESTIC_BACKUP_EXTRA_ARGS' 'RESTIC_REPOSITORY' 'RESTIC_VERBOSITY_LEVEL' 'RESTIC_RETENTION_HOURS' 'RESTIC_RETENTION_DAYS' 'RESTIC_RETENTION_MONTHS' 'RESTIC_RETENTION_WEEKS' 'RESTIC_RETENTION_YEARS')
+ local varnames
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ for varname in "${varnames[@]}"
+ '[' -z x ']'
+ warn_on_missing_envvars B2_ACCOUNT_ID B2_ACCOUNT_KEY B2_CONNECTIONS RESTIC_PASSWORD_FILE
+ unset_envs=()
+ local unset_envs
+ varnames=('B2_ACCOUNT_ID' 'B2_ACCOUNT_KEY' 'B2_CONNECTIONS' 'RESTIC_PASSWORD_FILE')
+ local varnames
+ for varname in "${varnames[@]}"
+ '[' -z xxxxxxxxxxxxxxxx ']'
+ for varname in "${varnames[@]}"
+ '[' -z xxxxxxxxxxxxxxxx ']'
+ for varname in "${varnames[@]}"
+ '[' -z 10 ']'
+ for varname in "${varnames[@]}"
+ '[' -z /etc/restic/pw.txt ']'
+ '[' 0 -gt 0 ']'
+ IFS=:
+ read -ra backup_paths
+ B2_ARG=
+ '[' -z x ']'
+ B2_ARG=(--option b2.connections="$B2_CONNECTIONS")
+ extra_args=()
+ IFS=
+ read -r -d ''
++ xargs printf '%s\0'
+ extra_args+=("$REPLY")
+ IFS=
+ read -r -d ''
+ extra_args=("${B2_ARG[@]}" "${extra_args[@]}")
+ backup_extra_args=()
+ IFS=
+ read -r -d ''
++ xargs printf '%s\0'
+ backup_extra_args+=("$REPLY")
+ IFS=
+ read -r -d ''
+ PRE_SCRIPT=/etc/restic/pre_backup.sh
+ test -x /etc/restic/pre_backup.sh
+ exclusion_args=(--exclude-file "$RESTIC_BACKUP_EXCLUDE_FILE")
+ for backup_path in "${backup_paths[@]}"
+ '[' -f /home/xxxxxxxxxxxxxxxx/.backup_exclude.txt ']'
+ FS_ARG=
+ test linux-gnu = msys
+ FS_ARG=--one-file-system
+ wait 41853
+ restic unlock --option b2.connections=10 ''

ggzica avatar Oct 20 '23 13:10 ggzica

PR is stale; will soon close.

github-actions[bot] avatar Apr 21 '24 00:04 github-actions[bot]