#2481 Issue closed: Unable to perform backup if the mounted path having space in directory name. Eg. "/run/media/vijay/disk 1 - vol"

Labels: support / question, fixed / solved / done

cvijayvinoth opened issue at 2020-08-18 07:08:

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.6 / 2020-06-17

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):

NAME=Fedora
VERSION="31 (Workstation Edition)"
ID=fedora
VERSION_ID=31
VERSION_CODENAME=""
PLATFORM_ID="platform:f31"
PRETTY_NAME="Fedora 31 (Workstation Edition)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:31"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f31/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=31
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=31
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation
  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
OUTPUT=ISO
BACKUP=RSYNC
RSYNC_PREFIX="$HOSTNAME"
OUTPUT_URL=rsync://diskimage@192.168.1.123::rsync_backup
BACKUP_URL=rsync://diskimage@192.168.1.123::rsync_backup
MESSAGE_PREFIX="$$: "
BACKUP_RSYNC_OPTIONS+=(-z --progress --password-file=/tmp/rsync_pass)
PROGRESS_MODE="plain"
AUTOEXCLUDE_PATH=( /tmp )
PROGRESS_WAIT_SECONDS="1"
  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    virtual machine

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

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

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

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

NAME                                        KNAME     PKNAME    TRAN   TYPE FSTYPE       SIZE MOUNTPOINT
/dev/sda                                    /dev/sda            sata   disk               32G 
|-/dev/sda1                                 /dev/sda1 /dev/sda         part ext4           1G /boot
`-/dev/sda2                                 /dev/sda2 /dev/sda         part LVM2_member   31G 
  |-/dev/mapper/fedora_localhost--live-root /dev/dm-0 /dev/sda2        lvm  ext4          29G /
  `-/dev/mapper/fedora_localhost--live-swap /dev/dm-1 /dev/sda2        lvm  swap         2.1G [SWAP]
/dev/sdb                                    /dev/sdb            sata   disk ext4          16G /run/media/vijay/disk 1 - vol
/dev/sr0                                    /dev/sr0            ata    rom              1024M
  • Description of the issue (ideally so that others can reproduce it):

If the mounted path having space on its name, x20 is replaced without backslash
and the error is showing as
df: /run/media/vijay/diskx201x20-x20vol: No such file or directory.

  • Workaround, if any:

  • Attachments, as applicable ("rear -D mkbackup" debug log files):

rear-localhost.log

jsmeix commented at 2020-08-18 11:29:

ReaR is not safe against blanks or special characters in file and directory names.
See https://github.com/rear/rear/issues/1372

Therefore you cannot use blanks or special characters in file and directory names
that matter for ReaR itself.

In your case mount /dev/sdb not at /run/media/vijay/disk 1 - vol
but use a mountpoint directory with a fully bash-compliant directory name,
cf. the part about "It is recommended to avoid special characters" in default.conf
https://github.com/rear/rear/blob/master/usr/share/rear/conf/default.conf#L1063

See also "Non-ASCII characters in file names" and
"Use whitespace characters in file names to fool others"
in https://en.opensuse.org/SDB:Plain_Text_versus_Locale

cvijayvinoth commented at 2020-08-18 12:02:

thanks for the update


[Export of Github issue for rear/rear.]