#2169 Issue closed: Cron Job Recovery Media not available

Labels: documentation, support / question, fixed / solved / done, minor bug

dcz01 opened issue at 2019-07-01 13:22:

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    Relax-and-Recover 2.5 / 2019-05-10
  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):
OS_VENDOR=RedHatEnterpriseServer
OS_VERSION=6.10
  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
OUTPUT=ISO
OUTPUT_URL=file:///tmp/rear
#BACKUP=NETFS
BACKUP=TSM
#BACKUP_PROG=tar
#BACKUP_PROG_CRYPT_ENABLED=1
#BACKUP_PROG_CRYPT_KEY=<Verschluesselungskennwort>
#BACKUP_PROG_CRYPT_OPTIONS="/usr/bin/openssl aes256 -salt -k"
#BACKUP_PROG_DECRYPT_OPTIONS="/usr/bin/openssl aes256 -d -k"
#BACKUP_URL=nfs://<IP-Adresse oder DNS-Name>/<Freigabepfad>
#BACKUP_URL=cifs://<Server>/<Freigabe>
#BACKUP_OPTIONS="cred=/etc/rear/cifs,sec=ntlmsspi"
#BACKUP_TYPE=incremental
#FULLBACKUPDAY="Sat"
#BACKUP_PROG_EXCLUDE=( '/tmp/*' '/dev/shm/*' $VAR_DIR/output/\* '/opt/tivoli/tsm/rear/*' '/mnt/*' '/media/*' '/var/lib/pgsql/*/data/base/*' '/var/lib/pgsql/*/data/global/*' '/var/lib/pgsql/*/data/pg*/*' )
SSH_ROOT_PASSWORD='$1$HGjk3XUV$lid3Nd3k01Kht1mpMscLw1'
NON_FATAL_BINARIES_WITH_MISSING_LIBRARY='/opt/tivoli/tsm/client/ba/bin/libvixMntapi.so.1.1.0'
  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    Virtual Machine on VMware
  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    x86_64
  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
    BIOS and GRUB
  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    Local Storage/Local Disk
  • Description of the issue (ideally so that others can reproduce it):
The cron job from rear has been removed since the update from rear 2.4 to 2.5.
But how to automate the check for newer recovery media in an older system like RHEL6?
  • Workaround, if any:
    Create a own cron job to do this, but is also not working anymore.
0 3 * * * root ls /tmp/rear/$HOSTNAME/*.iso || /usr/sbin/rear mkrescue
10 3 * * * root ls /tmp/rear/$HOSTNAME/*.iso && chmod -R 755 /tmp/rear
#0 5 * * * root /usr/sbin/rear mkbackuponly
#0 4 * * * root mount -t nfs <IP-Adresse oder DNS-Name>:<Freigabepfad> <Pfad> && /usr/bin/find <Pfad> -mtime +30 -name '*tar.gz' -delete && umount <Pfad>
#0 4 * * * root mount -o cred=/etc/rear/cifs,sec=ntlmsspi //<Server>/<Freigabe> <Pfad> && /usr/bin/find <Pfad> -mtime +30 -name '*tar.gz' -delete && umount <Pfad>
  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):

jsmeix commented at 2019-07-01 16:25:

FYI:
The cron job in /etc/cron.d/rear was removed intentionally via
https://github.com/rear/rear/commit/89a8f18ec402b439caf4800421644f5bf5d174e5
see also https://github.com/rear/rear/issues/1892
and https://github.com/rear/rear/issues/2139

gdha commented at 2019-07-02 15:05:

@dcz01 you can also try to automate rear via ansible, puppet or chef. This way you can install, configure whatever you like and in a uniform way

dcz01 commented at 2019-07-03 07:12:

@jsmeix @gdha
So we need to create our own cron job if we use an operating system without systemd?
There will be no fix?

jsmeix commented at 2019-07-03 08:58:

@dcz01
what is the problem with creating a cron job as you need it
for your particular use case in your particular environment?

Such things belong to the admin and are within the admin's own realm.

E.g. how should we know that just

30 1 * * * root /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue

is what the admin needs for his use case in his environment?

We (i.e. ReaR upstream) should not mess around with the admin's own realm.
Since ReaR 2.5 we do no longer mess around with the admin's own realm
so what was wrong before is now fixed.
Cf. the comments in https://github.com/rear/rear/issues/1892

dcz01 commented at 2019-07-03 09:30:

@jsmeix
Ah ok, now i understand.
Well then we fix it ourself and provide the old cron job for the rear checklayout.

jsmeix commented at 2019-07-03 12:15:

@dcz01
yes, that's how cron jobs should be set up since ReaR 2.5.

jsmeix commented at 2019-07-03 12:25:

@gdha
in the Release Notes for Relax-and-Recover version 2.5 at
http://relax-and-recover.org/documentation/release-notes-2-5
the "Product Features" section falsely still contains the item

cron job to check changes in disk layout and trigger rear mkrescue if required

I removed that item in the Release Notes for Relax-and-Recover version 2.6 via
https://github.com/rear/rear.github.com/commit/4a7a14cffb64dc9692d7b498ec2776e8923c29ef

Would it work when I remove it also in the
Release Notes for Relax-and-Recover version 2.5
source at
https://github.com/rear/rear.github.com/blob/master/documentation/release-notes-2-5.md
or would that be useless now after ReaR 2.5 was already released?

gdha commented at 2019-07-03 14:07:

@jsmeix

Would it work when I remove it also in the
Release Notes for Relax-and-Recover version 2.5
source at
https://github.com/rear/rear.github.com/blob/master/documentation/release-notes-2-5.md
or would that be useless now after ReaR 2.5 was already released?

Yes, as it has been removed we better remove that line as well in the release notes of 2.5. Thanks for pointing this out!

jsmeix commented at 2019-07-04 09:11:

I removed the "cron job" item from the "Product Features" section
in the Release Notes for Relax-and-Recover version 2.5 via
https://github.com/rear/rear.github.com/commit/46ad71e716f8a0e9731741c5cd493cdbc4b4e7cc


[Export of Github issue for rear/rear.]