#2332 Issue closed: Help - confused about initial setup usage for USB

Labels: support / question, fixed / solved / done

kingpoop opened issue at 2020-02-11 17:57:

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.2 / 2017-07-20

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04.6 LTS
    Release: 14.04
    Codename: trusty

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

OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL=usb:///dev/disk/bylabel/REAR-000
BACKUP_PROG=tar
BACKUP_PROG_COMPRESS_OPTIONS="--gzip"
BACKUP_PROG_COMPRESS_SUFFIX=".gz"
  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    N/A

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

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

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

  • 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 698.1G  0 disk
├─sda1   8:1    0 682.1G  0 part /
├─sda2   8:2    0     1K  0 part
└─sda5   8:5    0    16G  0 part [SWAP]
sdb      8:16   0 931.5G  0 disk
└─sdb1   8:17   0 931.5G  0 part
sr0     11:0    1  1024M  0 rom
  • Description of the issue (ideally so that others can reproduce it):

I am confused in the instructions abou this line:

BACKUP_URL=usb:///dev/disk/by-label/REAR-000

If i am following the instructions word-for-word and i want to make a bare-metal backup using an attached USB drive as the target backup device my question is do i use this line exactly as it is stated per the instructions:

BACKUP_URL=usb:///dev/disk/by-label/REAR-000

I do not understand what /disk/ means and i do not understand what /by-label/ means.
are they just placeholders and i am expected to update these labels with something like:

BACKUP_URL=usb:///dev/sdb/MyExtUSB/REAR-000

where /sdb is my external usb drive and MyExtUSB is a mount point that i created with

mkdir /mnt/MyExtUSB 
mount /dev/sdb /mnt/MyExtSUB
  • Workaround, if any:
    N/A

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

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

```
verbatim content
```

kingpoop commented at 2020-02-11 19:00:

In addition, after following the instructions word for word and issuing the following command: sudo usr/sbin/rear -V mkrescue
I got the following error:

sudo /usr/sbin/rear -v -S mkrescue
Relax-and-Recover 2.2 / 2017-07-20
Using log file: /var/log/rear/rear-gitlab.log
Press ENTER to include '/usr/share/rear/conf/Linux-i386.conf' ...
Press ENTER to include '/usr/share/rear/conf/GNU/Linux.conf' ...
Press ENTER to include '/usr/share/rear/conf/Ubuntu.conf' ...
Press ENTER to include '/etc/rear/local.conf' ...
Press ENTER to include '/usr/share/rear/init/default/010_set_drlm_env.sh' ...
Press ENTER to include '/usr/share/rear/init/default/030_update_recovery_system.sh' ...
Press ENTER to include '/usr/share/rear/init/default/050_check_rear_recover_mode.sh' ...
Press ENTER to include '/usr/share/rear/prep/default/005_remove_workflow_conf.sh' ...
Press ENTER to include '/usr/share/rear/prep/default/020_translate_url.sh' ...
Press ENTER to include '/usr/share/rear/prep/default/030_translate_tape.sh' ...
Press ENTER to include '/usr/share/rear/prep/default/040_check_output_scheme.sh' ...
Press ENTER to include '/usr/share/rear/prep/NETFS/default/050_check_NETFS_requirements.sh' ...
Press ENTER to include '/usr/share/rear/prep/default/050_check_keep_old_output_copy_var.sh' ...
Press ENTER to include '/usr/share/rear/prep/NETFS/default/060_mount_NETFS_path.sh' ...
ERROR: Mount command 'mount -v -o rw,noatime /dev/disk/bylabel/REAR-000 /tmp/rear.u3JFzr04IEqgeHb/outputfs' failed.

kingpoop commented at 2020-02-11 19:06:

The log file lists the following:

2020-02-11 10:57:54.846013609 Relax-and-Recover 2.2 / 2017-07-20
2020-02-11 10:57:54.847261794 Command line options: /usr/sbin/rear -v -S mkrescue
2020-02-11 10:57:54.848356322 Using log file: /var/log/rear/rear-gitlab.log
2020-02-11 10:58:01.912918008 Including conf/Linux-i386.conf
2020-02-11 10:58:03.800951887 Including conf/GNU/Linux.conf
2020-02-11 10:58:05.176878700 Including conf/Ubuntu.conf
2020-02-11 10:58:05.592797310 Including /etc/rear/local.conf
2020-02-11 10:58:05.596998722 ======================
2020-02-11 10:58:05.598644949 Running 'init' stage
2020-02-11 10:58:05.600285658 ======================
2020-02-11 10:58:10.160786135 Including init/default/010_set_drlm_env.sh
2020-02-11 10:58:10.984702876 Including init/default/030_update_recovery_system.sh
2020-02-11 10:58:11.360913207 Including init/default/050_check_rear_recover_mode.sh
2020-02-11 10:58:11.363066930 Finished running 'init' stage in 6 seconds
2020-02-11 10:58:11.374556493 Using build area '/tmp/rear.u3JFzr04IEqgeHb'
mkdir: created directory '/tmp/rear.u3JFzr04IEqgeHb/rootfs'
mkdir: created directory '/tmp/rear.u3JFzr04IEqgeHb/tmp'
2020-02-11 10:58:11.379478205 Running mkrescue workflow
2020-02-11 10:58:11.381244779 ======================
2020-02-11 10:58:11.382939203 Running 'prep' stage
2020-02-11 10:58:11.384596681 ======================
2020-02-11 10:58:11.744835595 Including prep/default/005_remove_workflow_conf.sh
mkdir: created directory '/tmp/rear.u3JFzr04IEqgeHb/rootfs/etc'
mkdir: created directory '/tmp/rear.u3JFzr04IEqgeHb/rootfs/etc/rear'
2020-02-11 10:58:12.169056268 Including prep/default/020_translate_url.sh
2020-02-11 10:58:12.913019049 Including prep/default/030_translate_tape.sh
2020-02-11 10:58:13.145235884 Including prep/default/040_check_output_scheme.sh
2020-02-11 10:58:14.265260158 Including prep/NETFS/default/050_check_NETFS_requirements.sh
2020-02-11 10:58:14.273507210 Skipping 'ping' test for host '' in BACKUP_URL 'usb:///dev/disk/bylabel/REAR-000'
2020-02-11 10:58:16.088779456 Including prep/default/050_check_keep_old_output_copy_var.sh
2020-02-11 10:58:18.281162038 Including prep/NETFS/default/060_mount_NETFS_path.sh
mkdir: created directory '/tmp/rear.u3JFzr04IEqgeHb/outputfs'
2020-02-11 10:58:18.302739996 Mounting with 'mount -v -o rw,noatime /dev/disk/bylabel/REAR-000 /tmp/rear.u3JFzr04IEqgeHb/outputfs'
mount: special device /dev/disk/bylabel/REAR-000 does not exist
mount: you didn't specify a filesystem type for /dev/disk/bylabel/REAR-000
       I will try all types mentioned in /etc/filesystems or /proc/filesystems
Trying ext3
2020-02-11 10:58:18.307228604 ERROR: Mount command 'mount -v -o rw,noatime /dev/disk/bylabel/REAR-000 /tmp/rear.u3JFzr04IEqgeHb/outputfs' failed.
==== Stack trace ====
Trace 0: /usr/sbin/rear:538 main
Trace 1: /usr/share/rear/lib/mkrescue-workflow.sh:12 WORKFLOW_mkrescue
Trace 2: /usr/share/rear/lib/framework-functions.sh:95 SourceStage
Trace 3: /usr/share/rear/lib/framework-functions.sh:49 Source
Trace 4: /usr/share/rear/prep/NETFS/default/060_mount_NETFS_path.sh:11 source
Trace 5: /usr/share/rear/lib/global-functions.sh:292 mount_url
Trace 6: /usr/share/rear/lib/_input-output-functions.sh:242 StopIfError
Message: Mount command 'mount -v -o rw,noatime /dev/disk/bylabel/REAR-000 /tmp/rear.u3JFzr04IEqgeHb/outputfs' failed.
== End stack trace ==

kingpoop commented at 2020-02-11 19:08:

My issue is that these instructions do not appear to work by following them word for word and attaching an external USB drive to the linux server.
http://relax-and-recover.org/documentation/getting-started

kingpoop commented at 2020-02-11 19:09:

my local.conf file contents are as follows:
cat /etc/rear/local.conf

  # Default is to create Relax-and-Recover rescue media as ISO image
  # set OUTPUT to change that
  # set BACKUP to activate an automated (backup and) restore of your data
  # Possible configuration values can be found in /usr/share/rear/conf/default.conf
  #
  # This file (local.conf) is intended for manual configuration. For configuration
  # through packages and other automated means we recommend creating a new
  # file named site.conf next to this file and to leave the local.conf as it is.
  # Our packages will never ship with a site.conf.
  OUTPUT=ISO
  BACKUP=NETFS
  BACKUP_URL=usb:///dev/disk/bylabel/REAR-000

jsmeix commented at 2020-02-12 07:58:

@kingpoop
just do what you say and follow the instructions in
http://relax-and-recover.org/documentation/getting-started
word for word which read in particular (excerpts):

OUTPUT=USB

and

BACKUP_URL=usb:///dev/disk/by-label/REAR-000

Cf. the error message you got

mount: special device /dev/disk/bylabel/REAR-000 does not exist

A precondition that

/dev/disk/by-label/REAR-000

does exist is that you did before what
http://relax-and-recover.org/documentation/getting-started
describes about Prepare your USB media.
For more details about how to "Prepare your USB media"
see the section about OUTPUT=USB in default.conf
https://github.com/rear/rear/blob/master/usr/share/rear/conf/default.conf#L710

A general warning when you use a USB recovery disk:
Caution during "rear recover" when you use a USB disk, see
https://github.com/rear/rear/issues/1854
For me it never happened that my ReaR USB disk
became /dev/sda in my ReaR recovery system
on my laptop or on any of my virtual machines
(my ReaR USB disk always was /dev/sdb)
so I was never personally hit by such an issue.

jsmeix commented at 2020-02-12 08:04:

@kingpoop
as a generic warning when you work on "disaster recovery"
see in particular the section about
"Inappropriate expectations" at
https://en.opensuse.org/SDB:Disaster_Recovery

kingpoop commented at 2020-02-12 16:34:

@jsmeix
Thank you for the feedback.
I got it working per the instructions as i was using /bylabel/ instead of /by-label/ and so rear scripts did not recognize the path. Once i updated to /by-label/ it worked as expected.
Thanks

jsmeix commented at 2020-02-13 07:26:

@kingpoop
thank you for your feedback that what is described at
http://relax-and-recover.org/documentation/getting-started
also works in your case.
I am not a Ubuntu user so things might behave different there
so that BACKUP_URL=usb:///dev/disk/by-label/REAR-000
does not work (some 'udev' magic is needed that creates
those /dev/disy/by-... symbolic links when such kind of
device is there during booting or gets plugged in later).


[Export of Github issue for rear/rear.]