Skip to content

Conversation

@exa18
Copy link

@exa18 exa18 commented Feb 4, 2025

NOTE:

  • .config 100% compatible with previews version
  • shellcheck 100% valid

0.7.1 : Added detailed help and none encryption

Added detailed help to show:

  • defined backup dirs
  • if is more prunes
  • encryption kind
  • shorten executable name

If Passphrase is empty then apply NONE for encryption. No longer error display.

0.8.0: change passphrase

  • rearanged .conf to meet mandatory first and important optional as second
  • added option to change SUFFIX for repo name
  • added passphrase to set for each repos
  • added passphrase change, need provide sudo while change /etc/borg*.conf
  • fixed help to show if global passphrase is set and/or for each repo

exa18 added 3 commits February 4, 2025 19:12
.config 100% compatible with previews version
shellcheck 100% valid
*
Added detailed help to show:
- defined backup dirs
- if is more prunes
- encryption kind
- shorten executable name
*
If Passphrase is empty then apply NONE for encryption. No longer error display.
// forget add REPOKEY
rearanged .conf to meet mandatory first and important optional as second
added option to change SUFFIX for repo name
added passphrase to set for each repos
added passphrase change, need provide sudo while change /etc/borg*.conf
fixed help to show if global passphrase is set and/or for each repo
@exa18 exa18 changed the title v0.7.1: Added detailed help and none encryption v0.8.0: Detailed help and change passphrase Mar 24, 2025
@inkdot7
Copy link
Contributor

inkdot7 commented May 8, 2025

Hi!
I'm just another user of these scripts.
It might be easier to get these changes reviewed if the commits are split into the individual changes, while the fixup commit is squashed with the change it fixes (since that seems to also be part of the PR). (I have found git revise -i ... to be very useful.)
Also, if the re-arrangement of the config file would be done in a separate PR after the functionality changes, then the total diff of this PR would be smaller and thus simplify review.

@exa18
Copy link
Author

exa18 commented May 12, 2025

Hi, thanks for yor reply,
well, allright, I just did while not wanted do branches :/ (and now its like you said) but also changes are back compatible to previews version, but sure I will try split it. As sidenote I allready using this version in working env so it is tested.

ps.
0.7.1 Main changes I did inside help where shows more details. Also added PRUNE option to work like BACKUP_dir as set for each Backups. Plus its possible to not set password.
0.8.0 It could be more confusing while looking diffs. But all structure for .config is just rearanged to other lines but not changed, also added explanation for new possible options. Default values added to script. This version provide 2 features. First password could be set for individual backup or just like main password. Second added function to change password and it relay on main password or individual (it depends what is set) and also it work over single backup or all as second arg. In this function I did put line with sudo which after granted replace old config with new and after doing borg command to change key. So if sudo fails then no key and config will change.
So this from 0.7.1 which makes possible to provide no password:

if [ -z "${PASSPHRASE-}" ];then
	REPOKEY="none"
else
	REPOKEY="repokey"
	export BORG_PASSPHRASE="$PASSPHRASE"
fi

become this in 0.8.0 inside loop:

eval "THIS_PASSPHRASE=\${PASSPHRASE_${B}-\${PASSPHRASE-}}"
		if [ -z "${THIS_PASSPHRASE-}" ];then
			REPOKEY="none"
		else
			REPOKEY="repokey"
			export BORG_PASSPHRASE="$THIS_PASSPHRASE"
		fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants