-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #27 and corrects comments from pull #27 #31
Conversation
…eration the conversation at issue blacklabelops#27
…so corrected comments from pull blacklabelops#26
imagescripts/create_jobber.sh
Outdated
@@ -13,9 +13,13 @@ cat > ${JOBBER_SCRIPT_DIR}/periodicBackup <<_EOF_ | |||
|
|||
set -o errexit | |||
|
|||
PREPOSTSTRATEGY=/preexecute/backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic variable. How and where will this be interpreted?
Better: Two variables DUPLICITY_ACTION
, e.g. backup
, verify
, restore
. Then EXECUTION_PHASE
, e.g. preAction
and postAction
.
Variables will be passed directly: prepoststrategy $DUPLICITY_ACTION $EXECUTION_PHASE.
The logic using those variables will be implemented inside prepoststrategy.
This is more maintainable for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic variable was used inside the prepoststrategy
script and was the path to the folder to execute.
But you are right, better with two variables, but instead of declaring the variables in the backup, backupRestore, periodicBackup, etc
scripts im going to change it so instead of declaring the variable and then using it in the prepoststrategy
script, the prepoststrategy
script is going to accept two arguments, execution phase (preAction and postAction) and duplicity action (backup, restore, verify).
This way we remove duplicated code and the user can execute prepost strategies in a more readeable way, example: prepoststrategy preAction verify
instead of the old prepoststrategy /preexecute/verify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last commit should have this fixed.
No description provided.