#2327 Issue closed: Backup directory in '/' filesystem forbidden with BACKUP_URL="file:///..."

Labels: support / question, fixed / solved / done

armandocardenasf opened issue at 2020-02-04 04:11:

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.3 / Git

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.3 LTS
    Release: 18.04
    Codename: bionic

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):

OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL="file:///media/usbdisk/bk"
BACKUP_PROG_INCLUDE=( '/*' )
BACKUP_PROG_EXCLUDE=( '/var/lib/rear/*' '/tmp/*' '/proc/*' '/sys/*' '/dev/*' '/lost+found/*')
BACKUP_ONLY_INCLUDE="true"
BACKUP_ONLY_EXCLUDE=y
  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    IBM POWER8

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    PPC64/PPC64LE

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    SSD

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT" or "lsblk" as makeshift):

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   1.8T  0 disk 
└─sda1   8:1    0   1.8T  0 part 
sdj      8:144  1 894.3G  0 disk 
├─sdj1   8:145  1     7M  0 part 
└─sdj2   8:146  1 894.3G  0 part /
sdk      8:160  1 894.3G  0 disk 
├─sdk1   8:161  1     1K  0 part 
└─sdk5   8:165  1 894.3G  0 part /data
sr0     11:0    1  1024M  0 rom  
sr1     11:1    1  1024M  0 rom  
sr2     11:2    1  1024M  0 rom  
sr3     11:3    1  1024M  0 rom
  • Description of the issue (ideally so that others can reproduce it):
    When execute the follow REAR command : sudo rear -v -C basic mkbackup
    I got the follow error:
Relax-and-Recover 2.3 / Git
Using log file: /var/log/rear/rear-koza.log
Sourcing additional configuration file '/etc/rear/basic.conf'
Using backup archive '/media/usbdisk/bk/koza/backup-basic.tar.gz'
ERROR: URL 'file:///media/usbdisk/bk' has the backup directory '/media/usbdisk/bk' in the '/' filesystem which is forbidden.
Aborting due to an error, check /var/log/rear/rear-koza.log for details
Terminated
  • Workaround, if any:

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
    rear-koza.log

To paste verbatim text like command
output or file content,
include it between a leading and a closing line of three backticks like

```
Relax-and-Recover 2.3 / Git
Using log file: /var/log/rear/rear-koza.log
Sourcing additional configuration file '/etc/rear/basic.conf'
Using backup archive '/media/usbdisk/bk/koza/backup-basic.tar.gz'
ERROR: URL 'file:///media/usbdisk/bk' has the backup directory '/media/usbdisk/bk' in the '/' filesystem which is forbidden.
Aborting due to an error, check /var/log/rear/rear-koza.log for details
Terminated
```

gozora commented at 2020-02-04 08:34:

if you are using file:// you need to manually mount you USB device into specified destination (/media/usbdisk/bk) before launching rear mkbackup ... (same applies for rear recover)

Btw. ReaR supports booting directly from USB device, without need to create ISO.

V.

jsmeix commented at 2020-02-04 09:57:

@armandocardenasf
only as a side note because you use the meanwhile
rather old ReaR 2.3 version on POWER architecture,
cf. "rear / rear116 / rear1172a / rear118a / rear23a" in
https://en.opensuse.org/SDB:Disaster_Recovery
that reads excerpt:

In practice ReaR version 2.4 is basically
required on POWER architectures

see also "Version upgrades with Relax-and-Recover"
and "Testing current ReaR upstream GitHub master code" in
https://en.opensuse.org/SDB:Disaster_Recovery

gozora commented at 2020-02-04 10:25:

Heh, i didnt noticed that it is Power, so i'm not so sure with that mentioned usb stuff any more.

V.

jsmeix commented at 2020-02-04 11:10:

I think media/usbdisk indicates a USB disk is used.
Would of course be nice to know what is in /etc/rear/basic.conf.
But regardless of what there is at BACKUP_URL="file:///..."
in any case when BACKUP_URL="file:///..." is used
that thingy must be a separatedly mounted fileystem-like thing
that does not belong to the / filesystem, cf.
https://github.com/rear/rear/blob/master/usr/share/rear/prep/NETFS/default/400_automatic_exclude_recreate.sh

armandocardenasf commented at 2020-02-04 18:13:

I already solved the problem, thank you very much. The problem was at the mounting point of the USB drive, there was a failure, unmount and mount again, and everything worked fine. I appreciate your time and attention

jsmeix commented at 2020-02-05 09:39:

@armandocardenasf
thank you for your feedback what the root cause was
in your particular case.
Such feedback helps us a lot to understand whether our code
behaves reasonably well even in exceptional cases
or if we need to do further improvements.


[Export of Github issue for rear/rear.]