#1508 Issue closed
: NETFS Backup with local path fails¶
Labels: support / question
, won't fix / can't fix / obsolete
NoelzeN opened issue at 2017-09-21 09:04:¶
Hi,
I try to do a local backup with rear which I then want to copy to
another location with rsync (Together with other files that's why I
don't want to use a remote storage in rear directly).
However the backup fails with the following error:
ERROR: URL 'file:///var/backup/fullbackup/actualbackup' has the backup directory '/var/backup/fullbackup/actualbackup' in the '/' filesystem which is forbidden.
I've seen some reports about that but all got closed and seem to get resolved, however for some reason it is not working for me. Below please see my local.conf:
OUTPUT=ISO
OUTPUT_URL=file:///var/backup/fullbackup
BACKUP=NETFS
BACKUP_URL=file:///var/backup/fullbackup/actualbackup
BACKUP_PROG_EXCLUDE=( "${BACKUP_PROG_EXCLUDE[@]}" '/var/backup/fullbackup' '/proc' '/tmp' )
I compiled an rpm from the latest github code and installed it so I should have the most recent rear version:
# rpm -qa | grep rear
rear-2.2-1.git.2502.d8550a0.master.el7.centos.x86_64
Would be great if you could let me know whether it should work with the most recent version (Which seems to be the case from what I read in the other Bug reports about this) and I'm simply stupid or whether there might still be some bug in the code.
Running rear in debug mode I get this (last 300 lines of logfile):
https://pastebin.com/517CnpTc
dcz01 commented at 2017-09-21 09:14:¶
Hi NoelzeN,
this error is normal because it is not intended to backup a system on
the same machine.
In this case you would have nothing to restore when the machine dies or
the hhds/raid fail.
NoelzeN commented at 2017-09-21 09:17:¶
Thanks, that makes sense, though I copy the files directly after the backup via rsync, just together with some other backup files like sql dumps. So there is no way to force this? Maybe this should be a warning instead of an error?
gdha commented at 2017-09-21 09:26:¶
@NoelzeN why not using BACKUP=rsync
method directly?
NoelzeN commented at 2017-09-21 09:30:¶
@gdha good question :) maybe I should do that. Though it'd still be interesting whether this could be put as a warning instead of an error (Like bad idea, but there might be some reason why you're doing this so if you can take the risk, go ahead)
jsmeix commented at 2017-09-22 10:30:¶
@NoelzeN
in general ReaR code is meant that the user can adapt
and enhace it as he needs it for his particular use case
so that for your particular use case you could change in
usr/share/rear/prep/NETFS/default/400_automatic_exclude_recreate.sh
that 'Error' into what you like e.g. a 'LogPrint' or alternatively
when you use ReaR GitHub master code into 'LogPrintError'
(cf. usr/share/rear/lib/_input-output-functions.sh).
Because that 'Error' exit is intentionally there to force the user
to do something in this case we won't change it into a message.
FYI:
In general we like to avoid warnings as much as possible, cf.
http://blog.schlomo.schapiro.org/2015/04/warning-is-waste-of-my-time.html
I think the issue is sufficiently answered so that I close it
but one can still add comments (even when it is closed).
[Export of Github issue for rear/rear.]