IS_EVOBACKUP_EXCLUDE_MOUNT with new version of evobackup #148

Closed
opened 2023-05-26 10:50:16 +02:00 by jlecour · 1 comment
Owner

Withe th enew version of evobackup and the way we declare excludes, evocheck can't verify that mount-points are excluded.

Withe th enew version of evobackup and the way we declare excludes, evocheck can't verify that mount-points are excluded.
Contributor

Hey, I've got some ideas to fix this issue.

Firstly, I think we should use command sed because, here, we try to capture all values of variable "RSYNC_EXCLUDES" and sed can do it like on this example below :

sed -n '/RSYNC_EXCLUDES="/,/"/p' "${evobackup_file}

Above, we can see that sed catch content between RSYNC_EXCLUDES=" and the last " moreover /p will print all of this content, even the beginning and the ending of the variable.

To only obtain the content of this variable, we will add a new command sed which will delete on the output the beginning and the ending.

sed -n '/RSYNC_EXCLUDES="/,/"/p' "${evobackup_file} | sed '1d;$d'

Secondly, I was thinking, how can we add this command on the function check_evobackup_exclude_mount :

  1. create a variable which is call version_of_zzz_evobackup
  2. add a new condition if ( cause : if variable version is >= than 22.12) which will play the new command in case of success and in case of failed will play the command already installed

Minus 3. Idea of version can be complicated because there is some server which have script zzz_evobackup which hasn't a variable version

Hope, this idea will help to solve this issue.

Hey, I've got some ideas to fix this issue. Firstly, I think we should use command sed because, here, we try to capture all values of variable "RSYNC_EXCLUDES" and sed can do it like on this example below : ` sed -n '/RSYNC_EXCLUDES="/,/"/p' "${evobackup_file}` Above, we can see that sed catch content between **RSYNC_EXCLUDES="** and the last **"** moreover /p will print all of this content, even the beginning and the ending of the variable. To only obtain the content of this variable, we will add a new command sed which will delete on the output the beginning and the ending. `sed -n '/RSYNC_EXCLUDES="/,/"/p' "${evobackup_file}` **| sed '1d;$d'** Secondly, I was thinking, how can we add this command on the function **check_evobackup_exclude_mount** : 1. create a variable which is call version_of_zzz_evobackup 2. add a new condition if ( cause : if variable version is >= than 22.12) which will play the new command in case of success and in case of failed will play the command already installed Minus 3. Idea of version can be complicated because there is some server which have script zzz_evobackup which hasn't a variable version Hope, this idea will help to solve this issue.
isaid referenced this issue from a commit 2023-09-04 17:00:39 +02:00
isaid referenced this issue from a commit 2023-09-04 17:13:43 +02:00
isaid referenced this issue from a commit 2023-09-05 16:18:35 +02:00
isaid referenced this issue from a commit 2023-09-05 16:19:44 +02:00
isaid referenced this issue from a commit 2023-09-05 16:42:06 +02:00
isaid referenced this issue from a commit 2023-09-05 16:53:53 +02:00
isaid referenced this issue from a commit 2023-09-05 17:13:37 +02:00
isaid referenced this issue from a commit 2023-09-05 17:21:23 +02:00
isaid closed this issue 2023-09-05 17:23:15 +02:00
bwaegeneire referenced this issue from a commit 2023-11-21 17:00:18 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: evolix/evocheck#148
No description provided.