Results 1 to 5 of 5

Thread: REAR - Recover And Relax Question

  1. #1
    Join Date
    Sep 2008
    Location
    London, United Kingdom
    Posts
    12

    Default REAR - Recover And Relax Question

    Hi Guys,

    Although I've been messing around with Linux for a while now, I've only just decided to take it serious and use it as my main home PC now and toss Windows out the................well Window I guess.

    So to date if I ever broke my build it really wasn't the end of the world, installing drivers, trying apps, generally playing around. Although I'm going to be using my openSUSE 13.1 Gnome build as my main PC, the child in me will mean I'll continue to play around and mess with things (it's why I love Linux so much). I know I could run a VM for a test bed etc and I probably will do that, however I want a bare metal backup solution of my main build. I've spent a bit of time getting the drivers I wanted installed, the apps I like to use, my conky configs etc etc and I want a simple few command line restore options.

    So REAR appears to be the answer to my problem.

    However I’m having trouble getting REAR to do what I want, initially I want to create a bootable USB drive which will allow me to enter the REAR console, however the actual back I want to store on another drive (initially a local mount, but then moving over to my NAS).

    I've created my /etc/rear/local.conf as follows :
    Code:
    # sample local configuration
    
    # Create Relax-and-Recover rescue media as ISO image
    # OUTPUT=ISO
    
    OUTPUT=USB
    
    BACKUP=NETFS
    
    BACKUP_URL=file:///d02/backup/
    
    EOF
    I've ran the command to format the USB

    Code:
    glen@linux-svr01:~> sudo /usr/sbin/rear format /dev/sdd
    USB device /dev/sdd must be formatted with ext2/3/4 or btrfs file system
    Please type Yes to format /dev/sdd in ext3 format:
    Yes
    And then I thought it was as simple as running :

    Code:
    glen@linux-svr01:~> sudo /usr/sbin/rear -v mkrescue
    Relax-and-Recover 1.14 / Git
    Using log file: /var/log/rear/rear-linux-svr01.log
    ERROR: USB device ($USB_DEVICE) is not set.
    Aborting due to an error, check /var/log/rear/rear-linux-svr01.log for details
    But as you can see I get 'ERROR: USB device ($USB_DEVICE) is not set', and I've probably made a school boy error or completing misunderstood the concepts of the config file.

    Edit: Sorry added the log file mentioned in the terminal

    Code:
    2013-12-22 09:48:08 Relax-and-Recover 1.14 / Git
    2013-12-22 09:48:08 Command line options: /usr/sbin/rear -v mkrescue
    2013-12-22 09:48:08 Using log file: /var/log/rear/rear-linux-svr01.log
    2013-12-22 09:48:08 Including conf/Linux-i386.conf
    2013-12-22 09:48:08 Including conf/GNU/Linux.conf
    2013-12-22 09:48:08 Including /etc/rear/local.conf
    /etc/rear/local.conf: line 12: EOF: command not found
    2013-12-22 09:48:08 Using build area '/tmp/rear.TMqlBOQaWrVCskQ'
    mkdir: created directory '/tmp/rear.TMqlBOQaWrVCskQ/rootfs'
    mkdir: created directory '/tmp/rear.TMqlBOQaWrVCskQ/tmp'
    2013-12-22 09:48:08 Running mkrescue workflow
    2013-12-22 09:48:08 Running 'prep' stage
    2013-12-22 09:48:08 Including prep/default/00_remove_workflow_conf.sh
    mkdir: created directory '/tmp/rear.TMqlBOQaWrVCskQ/rootfs/etc'
    mkdir: created directory '/tmp/rear.TMqlBOQaWrVCskQ/rootfs/etc/rear'
    2013-12-22 09:48:08 Including prep/default/02_translate_url.sh
    2013-12-22 09:48:08 Including prep/default/03_translate_tape.sh
    2013-12-22 09:48:08 Including prep/USB/default/04_set_NETFS_requirements.sh
    2013-12-22 09:48:08 Including prep/NETFS/default/05_check_NETFS_requirements.sh
    2013-12-22 09:48:08 Skipping ping test
    2013-12-22 09:48:08 Including prep/USB/default/06_set_usb_device.sh
    2013-12-22 09:48:08 Including prep/NETFS/default/07_set_backup_archive.sh
    2013-12-22 09:48:08 Including prep/NETFS/default/15_save_rsync_version.sh
    2013-12-22 09:48:08 Including prep/GNU/Linux/20_include_agetty.sh
    2013-12-22 09:48:08 Including prep/NETFS/GNU/Linux/20_selinux_in_use.sh
    2013-12-22 09:48:08 Including prep/GNU/Linux/21_include_dhclient.sh
    2013-12-22 09:48:08 Including prep/GNU/Linux/22_include_lvm_tools.sh
    2013-12-22 09:48:08 Device mapper found enabled. Including LVM tools.
    2013-12-22 09:48:08 Including prep/GNU/Linux/23_include_md_tools.sh
    2013-12-22 09:48:08 Including prep/GNU/Linux/28_include_systemd.sh
    2013-12-22 09:48:08 Including systemd (init replacement) tool-set to bootstrap Relax-and-Recover
    2013-12-22 09:48:08 Including prep/GNU/Linux/28_include_vmware_tools.sh
    2013-12-22 09:48:08 Including prep/GNU/Linux/29_include_drbd.sh
    2013-12-22 09:48:08 Including prep/GNU/Linux/30_check_backup_and_output_url.sh
    2013-12-22 09:48:08 Including prep/GNU/Linux/30_include_grub_tools.sh
    2013-12-22 09:48:08 Including prep/USB/Linux-i386/33_find_isolinux.sh
    2013-12-22 09:48:08 Including prep/USB/Linux-i386/34_find_mbr_bin.sh
    2013-12-22 09:48:08 Including prep/USB/Linux-i386/35_check_usb_disk.sh
    2013-12-22 09:48:08 ERROR: USB device ($USB_DEVICE) is not set.
    === Stack trace ===
    Trace 0: /usr/sbin/rear:245 main
    Trace 1: /usr/share/rear/lib/mkrescue-workflow.sh:31 WORKFLOW_mkrescue
    Trace 2: /usr/share/rear/lib/framework-functions.sh:79 SourceStage
    Trace 3: /usr/share/rear/lib/framework-functions.sh:40 Source
    Trace 4: /usr/share/rear/prep/USB/Linux-i386/35_check_usb_disk.sh:2 source
    Trace 5: /usr/share/rear/lib/_input-output-functions.sh:131 StopIfError
    Message: USB device ($USB_DEVICE) is not set.
    ===================
    2013-12-22 09:48:08 Running exit tasks.
    2013-12-22 09:48:08 Finished in 1 seconds
    2013-12-22 09:48:08 Removing build area /tmp/rear.TMqlBOQaWrVCskQ
    rmdir: removing directory, '/tmp/rear.TMqlBOQaWrVCskQ'
    2013-12-22 09:48:08 End of program reached
    Unfortunately I've not found much in the way of help on Google (not to say something isn't out there), but was wondering if we have some REAR skills on the board, or at least a pointer to some more detailed documentation on REAR or working examples, the REAR site appears light on info and the openSUSE wiki's I’ve found talk more about strategy.

    Thanks in advance

    Glen
    Last edited by glenpalmer; 22-Dec-2013 at 03:08. Reason: Added logfile output

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,952
    Blog Entries
    2

    Default Re: REAR - Recover And Relax Question

    Without having run REAR myself before but based on the config file you posted I guess my question would be if you verified your USB device is really identified as "d02"

    If not, then you may need to change that accordingly.

    Assume also the User security context has write permissions on the new filesystem on the USB device.

    TSU

  3. #3
    Join Date
    Sep 2008
    Location
    London, United Kingdom
    Posts
    12

    Default Re: REAR - Recover And Relax Question

    Quote Originally Posted by tsu2 View Post
    Without having run REAR myself before but based on the config file you posted I guess my question would be if you verified your USB device is really identified as "d02" If not, then you may need to change that accordingly. Assume also the User security context has write permissions on the new filesystem on the USB device. TSU
    Thanks for coming back TSU /d02 is a second harddrive on the machine and it's own mount point. The USB stick I have is small and I was under the impression that the OUTPUT parameter would be where a boot image would be placed so that I can start REAR from boot, whereas the BACKUP_URL would be the location where the actual backup image would reside. Like I say, i've probably completely misunderstood REAR perhaps. I used the *.txt on the github https://github.com/rear/rear/blob/ma...figuration.txt

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,952
    Blog Entries
    2

    Default Re: REAR - Recover And Relax Question

    Quote Originally Posted by glenpalmer View Post
    Thanks for coming back TSU /d02 is a second harddrive on the machine and it's own mount point. The USB stick I have is small and I was under the impression that the OUTPUT parameter would be where a boot image would be placed so that I can start REAR from boot, whereas the BACKUP_URL would be the location where the actual backup image would reside. Like I say, i've probably completely misunderstood REAR perhaps. I used the *.txt on the github https://github.com/rear/rear/blob/ma...figuration.txt
    OK,
    Took a look at the documentation for you and I think I see your problem, the essential parts you're not configuring are

    lines 31-33
    OUTPUT=USB::
    Create a bootable USB disk (using extlinux). Specify the USB storage device by
    using +USB_DEVICE+.
    and lines 143-148
    BACKUP_URL=usb://::
    To backup to USB storage device, use +BACKUP_URL=usb:///dev/disk/by-label/REAR-000+
    or use a real device node or a specific filesystem label. Alternatively, you
    can specify the device using +USB_DEVICE=/dev/disk/by-label/REAR-000+.
    +
    If you combine this with +OUTPUT=USB+ you will end up with a bootable USB device.
    It seems you need to define a USB_DEVICE somewhere. So, one of the reasons why a test can fail is if there is a missing or incorrect path.

    TSU

  5. #5
    Join Date
    Sep 2008
    Location
    London, United Kingdom
    Posts
    12

    Default Re: REAR - Recover And Relax Question

    Thanks TSU,

    Had a little play around with this again earlier and managed to get it running by adding the USB drive to the config file.

    To be honest, I think REAR is probably a little overkill for my requirements really. Decided to use a slightly different approach to my recovery solution.

    Thanks again for the support.

    Glen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •