#1740 PR merged
: Yum+backup¶
Labels: enhancement
, fixed / solved / done
N3WWN opened issue at 2018-02-26 22:10:¶
Pull Request Details:¶
-
Type: Enhancement
-
Impact: Low
-
Reference to related issue (URL):
This is a continuation of the YUM backup method #1464
- How was this pull request tested?
CentOS 6 and CentOS 7 source VMs in Virtualbox, restoring to another VM
- Brief description of the changes in this pull request:
YUM+backup adds the ability to backup and restore files to the YUM method, which, like the ZYPPER method, recreates the target system from scratch using a list of RPMs captured from the source system.
The only files backed up are those which were either
- Not provided by RPM packages
- Were provided by RPM packages, but have been modified after installation
This minimizes the number of files included in the backups while still capturing every file on the system not explicitly excluded using options like BACKUP_PROG_EXCLUDE, EXCLUDE_MOUNTPOINTS, etc
New configuration options are
- YUM_BACKUP_FILES
If true, a backup archive (much like the NETFS archive) will be built - YUM_BACKUP_FILES_FULL_EXCL
If true, the filesystem is scanned for files which, though symlinked directories, point to the files which have been excluded from the backup. This minimizes the size of the backup archive in exchange for additional processing time - YUM_BACKUP_SELINUX_CONTEXTS
If true, also capture all of the SELinux contexts so they can be restored on the target system - RECREATE_USERS_GROUPS
Has 3 options, "no", "yes" and "yes" "passwords". If "no", no users that weren't added by RPM packages during install will exist on the target system. If "yes", users and groups will be recreated on the target system. If "yes" "passwords", users, groups and passwords are recreated on the target system.
Thanks!
-Rich Alloway (Rogue Wave)
N3WWN commented at 2018-02-27 21:57:¶
https://github.com/rear/rear/pull/1740/commits/6b9d8d8508183144f56eec92b828ae037c03a6f7 and https://github.com/rear/rear/pull/1740/commits/53afd8629589d660bc17a332439dffd6fca135d7 address the dollar-paren issue that @jsmeix mentioned as well as add the documentation @gdha requested.
jsmeix commented at 2018-02-28 12:09:¶
@N3WWN
many thanks in particular for the documentation.
When you do not plan to add more commits I would like to merge it
soon,
e.g. tomorrow (unless you tell me otherwise).
N3WWN commented at 2018-02-28 15:39:¶
Hi @jsmeix !
No additional commits are planned at this time. 😁
Thanks!
jsmeix commented at 2018-03-01 08:22:¶
@N3WWN
many thanks for this major contribution that much improves the YUM
method
towards a full solution to recreate the system completely as it was
before.
Now we have three fundamentally different methods in ReaR
how to recreate the system:
The most generic and very low level "BLOCKCLONE" method,
the various usual backup methods,
the higher level YUM and ZYPPER methods.
Those fundamentally different methods together with "multiple backups",
cf.
https://github.com/rear/rear/blob/master/doc/user-guide/11-multiple-backups.adoc
provide great flexibility and freedom to the user how he can recreate
each of his
various systems as he specifically needs it in his particular
environment.
When time permits I would like to enhance the ZYPPER method in the same
way
(i.e. I will basically copy as much of your code to implement
ZYPPER+backup).
For now I like to keep the scripts for YUM and ZYPPER totally
separated
until things stabilized - in particular after more user feedback (I am
still waiting
for a first user "out there" of the ZYPPER method - I am in particular
happy
that my ZYPPER method at least was useful to have now your much more
complete YUM+backup method in ReaR).
Later we can see what is really duplicate code and have common scripts
for that
or introduce a set of common functions that are used both by YUM and
ZYPPER.
jsmeix commented at 2018-03-01 08:25:¶
For the log:
I fixed a serious typo in my
https://github.com/rear/rear/pull/1740#issuecomment-369512311
which reads now (excerpt):
... I am in particular happy that my ZYPPER method at least was useful to have now your much more complete YUM+backup method in ReaR
[Export of Github issue for rear/rear.]