#1194 Issue closed
: syntax for /etc/rear/local.conf file¶
Labels: support / question
, fixed / solved / done
unix1adm opened issue at 2017-02-07 15:56:¶
Relax-and-Recover (rear) Issue Template¶
Please 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 1.17.2 / Git - OS version (cat /etc/rear/os.conf or lsb_release -a):
rhel 7.3 - rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
- Are you using legacy BIOS of UEFI boot?
no - Brief description of the issue:
I want Rear to use the local dir to back up to. I don't have an NFS server available to I want to change these lines so it will backup to a local mount I have.
However everything I tried does not seem to work.
For example:
OUTPUT_URL=/storage
BACKUP_URL=/storage
df
/dev/mapper/rootvg-storagelv 5232128 33072 5199056 1% /storage
I tried to export from the system itself to see if that would work. No
luck with that either
ERROR: Mount command 'mount -v -t nfs -o nfsvers=4,nolock
my.ip.here:/storage /tmp/rear.Mqr2qwJ69eH1t8G/outputfs' failed.
Aborting due to an error, check /var/log/rear/rear-pmisa2532.log for
details
You should also rm -Rf /tmp/rear.Mqr2qwJ69eH1t8G
It is exported unrestricted
exportfs
/storage
- Work-around, if any:
unix1adm commented at 2017-02-07 16:18:¶
I ran a default local.conf file (empty) and it ran
/var/lib/rear/output/rear-mysystem.iso was created. but not the other
files. Or if they were I have no idea what dir they are in.
I dont know if this file will work or not yet. I am thinking it will be missing things as it came back way to fast from other backups i have done.
I was expecting to see a dir like this
mysystem]# ls
backup.log README rear.log VERSION
backup.tar.gz rear-mysystem.iso selinux.autorelabel
gozora commented at 2017-02-07 16:28:¶
Hi @unix1adm,
I'm not sure if backup to local storage is a good idea...
You can however try BACKUP_URL=file://
For more info please read documentation.
V.
unix1adm commented at 2017-02-07 17:11:¶
This was just for a test. Not a perm thing.
I tired the suggestion you had and it did not work.
Message: Problem transferring files to file:/storage
I think the issue is this is a dir and it needs a file name here.
Thank you for the link. This is different than the one I found on goolge. I will review.
unix1adm commented at 2017-02-07 17:38:¶
It is odd when I try it in the ENV that has NFS enabled i get more files and I am able to rebuild systems fine.
When I try to do it to a local storage location I only get the ISO file
not the other files listed above.
Maybe because it is NFS it created more files?
Ill see if I can boot this ISO to see if it works as expected or not.
unix1adm commented at 2017-02-07 18:47:¶
So I tried the recovery CD and as i suspected it did not work. It is looking for the tar/gz file that never seems to be created.
gozora commented at 2017-02-07 20:17:¶
You are changing backup parameters too quickly for my taste.
I've tried to do backup on local disk. (despite my
https://github.com/rear/rear/issues/1194#issuecomment-278053647)
I've used following config file:
centos:(/root)(root)# cat /etc/rear/local.conf
OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL=file:///mnt/rear
ONLY_INCLUDE_VG=( "vg00" )
BACKUP_PROG_EXCLUDE=( ${BACKUP_PROG_EXCLUDE[@]} '/mnt/*' )
EXCLUDE_BACKUP=( ${EXCLUDE_BACKUP[@]} fs:/crash fs:/usr/sap fs:/oracle )
EXCLUDE_MD=( $(grep -o -E '^md[0-9]+' /proc/mdstat) ) # exclude all md devices
COPY_AS_IS=( ${COPY_AS_IS[@]} /sbin/sysctl /etc/sysctl.conf /sbin/if* /etc/sysconfig/network )
GRUB_RESCUE=n
Backup was stored on local disk /dev/sdb
centos:(/root)(root)# df -h /mnt/rear/
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 5,0G 1007M 4,1G 20% /mnt/rear
rear mkbackup
produced:
centos:(/root)(root)# ll /mnt/rear/centos/
total 997788
drwxr-x--- 2 root root 114 feb 7 20:59 .
drwxr-xr-x 3 root root 19 feb 7 20:36 ..
-rw------- 1 root root 4519561 feb 7 20:59 backup.log
-rw------- 1 root root 853743016 feb 7 20:59 backup.tar.gz
-rwx------ 1 root root 202 feb 7 20:55 README
-rw------- 1 root root 149458944 feb 7 20:55 rear-centos.iso
-rw------- 1 root root 13996728 feb 7 20:55 rear-centos.log
-rw------- 1 root root 275 feb 7 20:55 VERSION
Once I've destroyed system, booted ReaR rescue/recovery system from
rear-centos.iso and run rear mkrescue
, ReaR worked just fine.
V.
gdha commented at 2017-02-10 16:47:¶
@unix1adm Was your question answered?
unix1adm commented at 2017-02-10 17:27:¶
No i am still troubleshooting it
Sent from Yahoo Mail on Android
On Fri, Feb 10, 2017 at 11:47, gdhanotifications@github.com wrote:
@unix1adm Was your question answered?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
N3WWN commented at 2017-02-10 19:31:¶
Forgive me for jumping in the middle of this conversation, but if
@unix1adm is using BACKUP_URL=file:/storage
, I don't think that
adheres to the proper syntax.
Shouldn't it be BACKUP_URL=file:///storage
with three slashes if
/storage is an absolute path?
-Rich Alloway (RogueWave)
unix1adm commented at 2017-02-13 12:08:¶
Thank you for that info. What I am trying to do it backup to a
directory. /storage is a directory not a file.
The backup creates multiple files. So I cannot give it 1 file name.
Still researching the syntax for that.
For example ::
$ls
.lockfile backup.log rear.log
README backup.tar.gz selinux.autorelabel
VERSION rear-myserver.iso
All I am getting created is the .iso file. The .tar.gtz and other files never get created localy when I try to backup to /storage.
If I use NFS it works fine. However NFS is not always available on the test system so I wanted to just do it locally to test a few things.
gozora commented at 2017-02-13 16:17:¶
@unix1adm
file:// in this case more describes "protocol" that flat Linux file.
file:// prefix only tells rear that backup will be stored on local
disk.
Still researching the syntax for that.
As @N3WWN already pointed out. If you want to store your backups into
/storage directory use BACKUP_URL=file:///storage
in your
local.conf.
In some cases it might be a good idea to exclude /storage from backup
(to avoid never ending backup story) e.g. add
BACKUP_PROG_EXCLUDE=( "${BACKUP_PROG_EXCLUDE[@]}" '/storage/*' )
to
local.conf
V.
gdha commented at 2017-02-14 08:35:¶
@unix1adm Be aware if /storage
is a directory beneath /
then it will
never work (forbidden to use /
as archive target). Make sure it is a
separate mounted file system.
unix1adm commented at 2017-02-14 19:31:¶
@gdha Thank you yes /storage is its own lv and mount point.
@gozora thank you yes I was concerned about backing up the backup
itself. Never a good idea.
I did try the BACKUP_URL=file:///storage but did not work the way I was
hoping it to.
gdha commented at 2017-02-24 12:35:¶
@unix1adm Any progress made? And what is the content of the current
local.conf
file you are using?
unix1adm commented at 2017-03-08 13:05:¶
HI Sorry got pulled off onto something else. We are also working with Red Hat on this too.
Ill try to get some time to update the progress made in the next few days.
unix1adm commented at 2017-03-17 13:26:¶
Not yet. Have been tasked with a more critical item. Hope to review it next week.
Sent from Yahoo Mail on Android
On Fri, Feb 24, 2017 at 7:35, gdhanotifications@github.com wrote:
@unix1adm Any progress made? And what is the content of the current
local.conf file you are using?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
unix1adm commented at 2017-08-21 11:15:¶
Hi sorry it has been a while since I updated this.
We found a bug and reported it back to Red Hat and they were working on
it.
It was resolved with the release that sent out with Rhel 7,.4.
rear-2.00-2.el7.x86_64
gdha commented at 2017-08-21 11:47:¶
@unix1adm Just for completeness what was the bug that your reported and was fixed by RH?
unix1adm commented at 2017-08-21 12:52:¶
I will look it up and get back to you in a bit. Sorry crazy monday.
Sent from Yahoo Mail on Android
On Mon, Aug 21, 2017 at 7:47, gdhanotifications@github.com wrote:
@unix1adm Just for completeness what was the bug that your reported and
was fixed by RH?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
[Export of Github issue for rear/rear.]