#3229 PR merged
: Do not exclude '/var/tmp/rear.*' in default.conf¶
Labels: bug
, fixed / solved / done
jsmeix opened issue at 2024-05-21 12:47:¶
-
Type: Bug Fix
-
Impact: Normal
-
Reference to related issue (URL):
https://github.com/rear/rear/pull/3224 -
How was this pull request tested?
I manually reverted the actual change in
https://github.com/rear/rear/pull/3224
and then the current ReaR BUILD_DIR is not included
in the backup but a leftover ReaR BUILD_DIR from
a previous "rear -D mkbackup" gets correctly included
in the backup because it is my task to remove
my intentionally kept BUILD_DIR (via '-D').
- Description of the changes in this pull request:
Revert the actual change in
https://github.com/rear/rear/pull/3224
and have BACKUP_PROG_EXCLUDE in default.conf same as before
because the current BUILD_DIR gets automatically
excluded in usr/sbin/rear via
BACKUP_PROG_EXCLUDE+=( "$BUILD_DIR" )
It is not ReaR's task to exclude possibly lefover
older ReaR working areas because in general
files in /var/tmp are persistent which need
to be cleaned up deliberately by the user
(and not by ReaR from behind via its backup).
Also described things more clearly in the comment.
pcahyna commented at 2024-05-21 13:24:¶
Something is wrong with the Fedora rawhide CI run, looking... I see in the log
2024-05-21 12:57:19.478352214 Including build/default/950_check_missing_programs.sh
/usr/share/rear/lib/_input-output-functions.sh: line 581: type: mkfs.vfat: not found
/usr/share/rear/lib/_input-output-functions.sh: line 581: type: mkfs.vfat: not found
2024-05-21 12:57:19.496643501 ERROR: Cannot find required programs: mkfs.vfat
pcahyna commented at 2024-05-21 13:39:¶
Moreover, I see lots of messages in the mkbackup log which are not fatal, but suspect nevertheless:
2024-05-21 12:56:34.032479050 Including prep/default/400_save_directories.sh
/usr/share/rear/prep/default/400_save_directories.sh: line 12: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 80: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 80: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 80: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 120: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 120: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 120: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 120: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
2024-05-21 12:56:34.122955252 FHS directory /usr/X11R6 does not exist
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 120: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 120: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 120: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
grep: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
/usr/share/rear/prep/default/400_save_directories.sh: line 127: /var/lib/rear/recovery/directories_permissions_owner_group: No such file or directory
2024-05-21 12:56:34.152198390 Source function: 'source /usr/share/rear/prep/default/400_save_directories.sh' returns 1
jsmeix commented at 2024-05-22 13:32:¶
In current GitHub master code
/usr/share/rear/prep/default/400_save_directories.sh
line 12 is
# cat -n usr/share/rear/prep/default/400_save_directories.sh
...
11 local directories_permissions_owner_group_file="$VAR_DIR/recovery/directories_permissions_owner_group"
12 : >"$directories_permissions_owner_group_file"
...
which is the first thing that fails
so this one is
https://github.com/rear/rear/issues/3222
and
https://github.com/rear/rear/pull/3223
On my SLES15-SP5 test system I got for "rear -D mkbackup" only
2024-05-21 13:06:59.138690211 FHS directory /etc/sgml does not exist
2024-05-21 13:06:59.142684523 FHS directory /etc/xml does not exist
2024-05-21 13:06:59.148904248 FHS directory /media does not exist
2024-05-21 13:06:59.176064989 FHS directory /usr/X11R6 does not exist
but there I had already done a "rear -D mkbackup" before
so I already had a $VAR_DIR/recovery
from the first
"rear -D mkbackup" run.
jsmeix commented at 2024-05-23 05:41:¶
I edited my above
https://github.com/rear/rear/pull/3229#issuecomment-2124810175
by removing my misleading and false initial thoughts
so that now only the actual cause is shown.
jsmeix commented at 2024-05-23 06:05:¶
Regarding
ERROR: Cannot find required programs: mkfs.vfat
see in layout/save/GNU/Linux/230_filesystem_layout.sh
the last part where filesystem creating tools that
are required in the recovery system get added via
REQUIRED_PROGS+=( $required_mkfs_tools )
depending on which filesystem types entries ('^fs ')
exist in disklayout.conf
So in this case there must be a
fs .* vfat ...
entry in disklayout.conf
Because 'fs' entries have the form
fs <device> <mountpoint> <filesystem type> ...
I think that the grep search string
grep -q "^fs .* $filesystem_type " $DISKLAYOUT_FILE
in layout/save/GNU/Linux/230_filesystem_layout.sh
is sufficiently safe to not match false positives.
As far as I see the only possible false positive
would be a 'fs' entry with a ' vfat ' substring
but such a substring (with leading and trailing space)
would be invalid syntax in disklayout.conf, cf.
https://github.com/rear/rear/blob/master/doc/user-guide/06-layout-configuration.adoc#disk-layout-file-syntax
... keyword and all the values are separated
by single space characters (which means
spaces in values are forbidden ...
jsmeix commented at 2024-05-23 07:25:¶
@pcahyna
thank you for your review!
The description text is now much better.
[Export of Github issue for rear/rear.]