#597 PR merged: Added possibility to only backup BACKUP_PROG_INCLUDE

Labels: enhancement, waiting for info

rpasche opened issue at 2015-06-09 21:31:


this is only a suggestion that might be included into rear.

We use this kind of patch on all of our servers to only backup filesystems and directories, that are explicitly given in BACKUP_PROG_INCLUDE. So later added mountpoints and big data does NOT blow up the amount of data within the rear backup, when someone misses to update the local.conf.

Currently, we use the variable "MANUAL_INCLUDE" which we set to "YES" in "local.conf" to activate this mode.

As I said....just an idea.

gdha commented at 2015-06-11 14:39:

@rpasche Could you add an example about how you exactly use it? Would be easier for me to add it to the documentation later + release notes

rpasche commented at 2015-06-11 19:35:

We deploy our servers for our internal customers with a default FS layout with LVM like "/", /boot", "/tmp", "/data", "/var", "/home"....something like that.

A backup is made with additional software or via remote ("nfs") backup. So we only need to "backup" the "system" data.

We use something like this in our "local.conf"

BACKUP_PROG_INCLUDE = ("/", "/boot", "/var", "/home", "/tmp", "/data")
BACKUP_PROG_EXCLUDE = ("/data/*", "/tmp/*")

User "data", that should be saved to /data will be backed up by "TSM", so this does not be backed up separately with "rear".
Further...sometimes, additional space will be provided and that is - sometimes - added under additional mountpoints, for example "/data2". And if someone forgets to edit the local.conf, this "extra" data will be backed up by rear, blowing up the "rescue" system. Therefore, we say....we backup (for DR) the "system". "You" (customer) are responsible to tell the "backup admins", that your "extra" data will be correctly backed up by the additional backup software.

We already had the case, that "rear" backups crashed because additional data of several servers has been backed up by rear and flooded the "rear" image server.

schlomo commented at 2015-06-11 20:10:

Another idea that just popped up in my head: Since local.conf is a Bash script you can also call some external program there that takes a look at your system and populates the BACKUP_PROG_* variables with a more detailed list of directories.

Maybe that way you can dynamize the backup scope of ReaR to suit your needs?

The other question that I must ask: Why not simply backup also the system with TSM and not use ReaR internal backup at all? That is how (all) other TSM users employ ReaR. That way you don't need to deal with that problem at all and you can also have a complete restore upon recovery in one go.

rpasche commented at 2015-06-12 20:27:

Not every system uses TSM.. often because it is not necessary for the system.

gdha commented at 2015-06-12 21:03:

@rpasche Did you know the array ONLY_INCLUDE_VG can achieve practical the same what you are trying to realize:

default.conf:# syntax : e.g. ONLY_INCLUDE_VG=( "vg00" "vg01" )

The BACKUP_PROG_EXCLUDE should be sufficient then. Please give it a try.

rpasche commented at 2015-07-03 10:11:

Again...sorry for the long delay. I think, ONLY_INCLUDE_VG will include every volume within the group. True?

gdha commented at 2015-07-03 10:36:

@rpasche ONLY_INCLUDE_VG : only the mentioned VGs should be archived. The others should be commented out in the layout configuration file. Just try it out.

rpasche commented at 2015-07-23 12:59:

After a long time, I entered some info for the MANUAL_INCLUDE mode into conf/default.conf

gdha commented at 2015-07-24 08:17:

@rpasche Thank you for the clarification of the variable. When I was looking at your code I noticed a weakness in our style - the usage of true/false settings. We seem to have too many different ways of doing that. I would like to unify this (will make a separate issue of it).
@schlomo are you ok with this patch?

schlomo commented at 2015-07-26 08:47:

@gdha fine with me if it helps our users.

[Export of Github issue for rear/rear.]