#919 Issue closed: When using rsync, recovery iso is written to BACKUP_URL even if OUTPUT_URL is defined

Labels: bug, fixed / solved / done

jmazanek opened issue at 2016-07-14 13:59:

Relax-and-Recover (rear) Issue Template

Please fill in the following items before submitting a new issue:

  • rear version (/usr/sbin/rear -V):Relax-and-Recover 1.17.2
  • OS version (cat /etc/rear/os.conf or lsb_release -a):Red Hat Enterprise Linux Server release 7.2 (Maipo)
  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):

[root@rearclient ~]# cat /etc/rear/local.conf
OUTPUT=ISO
BACKUP=RSYNC
BACKUP_URL=rsync://192.168.122.153/home/rear_bk
OUTPUT_URL=rsync://192.168.122.153/home/rear_rcv
GRUB_RESCUE=1
GRUB_RESCUE_PASSWD="grub.pbkdf2.sha512.10000.DF83192A49C67DCFA02EE0CDED0E23256C7151F504AACFA90738F914DFF402FB10D5FFD373AD15E3E9015F3BB8A5BD9784A251DCCD349A8B02D74407D7BA3467.C9C3B253C0E4F7622F3CEC60A73E9E7BC7C71172415F6689F528391020389202A6F73A01CF75DE0A33D54A7E8F8352FF0DF14C741A0A11B8F372D6A97DA61027"

  • Brief description of the issue
    When using rsync as both BACKUP_URL and OUTPUT_URL method, and they differ, both recovery iso and data backup are written into the directory defined in BACKUP_URL.
    rear -v mkbackup command incorrectly prints a message about copying iso image into OUTPUT_URL destination.
  • Work-around, if any
    Not known
  • Details

in configuration file both BACKUP_URL and OUTPUT_URL are defined

[root@rearclient ~]# cat /etc/rear/local.conf
OUTPUT=ISO
BACKUP=RSYNC
BACKUP_URL=rsync://192.168.122.153/home/rear_bk
OUTPUT_URL=rsync://192.168.122.153/home/rear_rcv
GRUB_RESCUE=1
GRUB_RESCUE_PASSWD="grub.pbkdf2.sha512.10000.DF83192A49C67DCFA02EE0CDED0E23256C7151F504AACFA90738F914DFF402FB10D5FFD373AD15E3E9015F3BB8A5BD9784A251DCCD349A8B02D74407D7BA3467.C9C3B253C0E4F7622F3CEC60A73E9E7BC7C71172415F6689F528391020389202A6F73A01CF75DE0A33D54A7E8F8352FF0DF14C741A0A11B8F372D6A97DA61027"

rear output says the iso is copied to /home/rear_rcv on remote server

[root@rearclient ~]# rear -v mkbackup
Relax-and-Recover 1.17.2 / Git
Using log file: /var/log/rear/rear-rearclient.log
Creating disk layout
Creating root filesystem layout
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
Making ISO image
Wrote ISO image: /var/lib/rear/output/rear-rearclient.iso (111M)
Copying resulting files to rsync://192.168.122.153/home/rear_rcv location
Modifying local GRUB configuration
Copying resulting files to rsync location
removed directory: '/tmp/rear.zr3jiOr0YAO12Vp/outputfs/rearclient'
Calculating size of /
Calculating size of /boot
Estimated size of local file systems is 2439 MB
Calculating size of 192.168.122.153:/home/rear_bk
Creating rsync archive on '192.168.122.153:/home/rear_bk'
Archived 0 MiB [avg 0 KiB/sec]OK
Number of files: 64938
Number of files transferred: 19
Total file size: 1645183364 bytes
Total transferred file size: 114387894 bytes
Literal data: 102577931 bytes
Matched data: 11809963 bytes
File list size: 1545560
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 104158557
Total bytes received: 101203

sent 104158557 bytes received 101203 bytes 18956320.00 bytes/sec
total size is 1645183364 speedup is 15.78 in 5 seconds.
mode of '/home/rear_bk/rearclient/backup' changed from 0555 (r-xr-xr-x) to 0755 (rwxr-xr-x)

what is actually created on backup destination

/home/rear_bk contains both data backup and recovery iso

[root@rearserver home]# ll rear_bk/
total 4
drwxr-x---. 3 root root 4096 Jul 14 15:25 rearclient
[root@rearserver home]# ll rear_bk/rearclient/
total 113488
drwxr-xr-x. 18 root root 4096 Jul 14 15:25 backup
-rw-------. 1 root root 256 Jul 14 15:21 backup-20160714.1521.log.gz
-rw-------. 1 root root 263 Jul 14 15:25 backup-20160714.1525.log.gz
-rw-------. 1 root root 202 Jul 14 15:24 README
-rw-r--r--. 1 root root 178697 Jul 14 15:21 rear-20160714.1521.log
-rw-r--r--. 1 root root 178695 Jul 14 15:25 rear-20160714.1525.log
-rw-------. 1 root root 174870 Jul 14 15:24 rear.log
-rw-------. 1 root root 115652608 Jul 14 15:24 rear-rearclient.iso
-rw-------. 1 root root 282 Jul 14 15:24 VERSION

/home/rear_rcv is empty

[root@rearserver home]# ll rear_rcv/
total 0
[root@rearserver home]

jsmeix commented at 2016-07-15 08:33:

Regarding "BACKUP_URL=rsync://" see https://github.com/rear/rear/issues/899

As far as I understand it this issue here is a
duplicate of https://github.com/rear/rear/issues/899

In current rear master I have implemeted a test for
currently known valid BACKUP_URL schemes,
see https://github.com/rear/rear/issues/842
so that it is fixed that one can specify invaild
BACKUP_URL schemes.


[Export of Github issue for rear/rear.]