Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NETFS Backup with local path fails #1508

Closed
NoelzeN opened this issue Sep 21, 2017 · 5 comments
Closed

NETFS Backup with local path fails #1508

NoelzeN opened this issue Sep 21, 2017 · 5 comments

Comments

@NoelzeN
Copy link

NoelzeN commented Sep 21, 2017

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
Copy link

dcz01 commented Sep 21, 2017

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
Copy link
Author

NoelzeN commented Sep 21, 2017

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
Copy link
Member

gdha commented Sep 21, 2017

@NoelzeN why not using BACKUP=rsync method directly?

@NoelzeN
Copy link
Author

NoelzeN commented Sep 21, 2017

@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
Copy link
Member

jsmeix commented Sep 22, 2017

@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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants