[rear-users] Changing /tmp directory for tar archive and redundant ISO questions

Gratien D'haese gratien.dhaese at it3.be
Sun May 25 18:42:05 CEST 2014

On Tue, 20 May 2014 13:25:17 -0400, Chris Twombly  wrote:  
I have a
couple questions as I start to get more into rear. I've used it a few
times already and it works great. Here is my current local.conf
configuration file as a reference: 




1. During the ISO build process, rear uses the /tmp
directory as a temporary build area for the tar archive. What script
handles this so that I can modify the location of /tmp to a different
directory? The reason for wanting to do this is because one of my
machines does not have enough disk space on the partition associated
with /tmp and I'd like to move the build directory to another directory
location - for example, /export - that does have enough disk space to
handle this operation.    

You can use TMPDIR variable for that

2. I'm still having issues getting a redundant ISO when
using the above local.conf configuration. It was recommended that I
remove the OUTPUT_URL definition previously, but this causes the
mkbackup operation to fail with the following error, "ERROR: The
OUTPUT_URL scheme can't be iso. You must choose a correct location!" The
default location for OUTPUT_URL is /var/lib/rear/output and I am
changing that to a directory I created /test. What I end up with is an
ISO at /test and then a subdirectory called localhost (/test/localhost)
with the ISO and some text files. The behavior seems correct, but not
what I want. Rear is creating an ISO at /test per the OUTPUT_URL
definition and then creating a subdirectory called localhost - per
definition in default.conf - that contains the same ISO plus additional
text and log files. I would like to eliminate the redundant ISO.  

believe the variable ISO_DIR found in default.conf may also play a role
here. I have to set ISO_DIR to some path in default.conf else rear will
not run because this variable cannot be left blank. It defaults to the
location /var/lib/rear/output but I have hardcoded this to /test. This
is the only modification I have made to default.conf. How are ISO_DIR
and OUTPUT_URL related when the OUTPUT=ISO variable is set?  

is used for the ISO file save point for rear on the system itself. 
OUTPUR_URL is the remote location for a copy of the ISO image. 
For the
moment it is not possible to remove the copy of ISO_DIR within rear -
that is an enhancement not yet written. Perhaps make an issue for this,
otherwise it might be forgotten.    

I have provided output from
running rear on an x86 test system with Centos 6.5 with the above
local.conf and with some comments. 

Running Rear

[root at localhost
tmp]# rear -v mkbackup 
Relax-and-Recover 1.15-git201404231046 /
Using log file: /var/log/rear/rear-localhost.log 
disk layout 
Creating root filesystem layout 
TIP: To login as root via
ssh you need to set up /root/.ssh/authorized_keys or SSH_ROOT_PASSWORD
in your configuration file 
Copying files and directories 
binaries and libraries 
Copying kernel modules 
Creating initramfs

Encrypting disabled 
Creating tar archive
'/tmp/rear.7cho3d7rtovkll2/tmp/isofs/backup/backup.tar.gz' /* This is
where I'd like to change /tmp to /export */ 
Archived 1911 MiB [avg 3665
Archived 1911 MiB in 535 seconds [avg 3658 KiB/sec]

Preparing 1 ISO images ... 
Making ISO image 
Wrote ISO image:
/test/rear-localhost.iso (2.0G) /* It writes an ISO at /test but then
also creates the same ISO at /test/localhost with additional files */

Copying resulting files to file location 

Directory of ISO after Rear
Backup Operation 

[root at localhost tmp]# cd /test 
[root at localhost test]# ls -l 
drwxr-x---. 2 root root 4096 May 20 10:45 localhost /*
directory defined in default.conf with ISO and additional files */

-rw-------. 1 root root 2086320128 May 20 10:43 rear-localhost.iso /*
this is the redundant ISO I'm talking about, but seems to be behaving
correctly based on OUTPUT_URL definition in local.conf */

[root at localhost test]# cd localhost/ 
[root at localhost localhost]# ls -l

total 2037616 
-rw-------. 1 root root 202 May 20 10:45 README

-rw-------. 1 root root 2086320128 May 20 10:45 rear-localhost.iso

-rw-------. 1 root root 181275 May 20 10:45 rear.log 
-rw-------. 1
root root 302 May 20 10:45 VERSION     
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pikachu.3ti.be/pipermail/rear-users/attachments/20140525/4912e98a/attachment.html>

More information about the rear-users mailing list