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 :
# 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
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 :
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
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