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

Exclude directories from rear backup and restore #591

Closed
msoupramanien opened this issue May 29, 2015 · 6 comments
Closed

Exclude directories from rear backup and restore #591

msoupramanien opened this issue May 29, 2015 · 6 comments

Comments

@msoupramanien
Copy link

Hi,

I have "/opt" as a mounted filesystem. I would like to exclude ONLY directory "/opt/apache-tomcat-6.0.33" underneath it from rear backup & recovery. Could you please suggest me what would be the correct EXCLUDE option to use.

Regards,

@gdha gdha self-assigned this May 31, 2015
@gdha
Copy link
Member

gdha commented May 31, 2015

You could add the following line to /etc/rear/local.conf:

EXCLUDE_BACKUP=( ${EXCLUDE_BACKUP[@]} /opt/apache-tomcat-6.0.33 )

@msoupramanien
Copy link
Author

Thanks. Will try it out.

@gdha
Copy link
Member

gdha commented Aug 6, 2015

@msoupramanien did it work?

@attiqmscs004
Copy link

attiqmscs004 commented Nov 8, 2018

@msoupramanien did it work?

No it did not work. Although it is printing in logs that it is excluding the logs. But still on backup system all files and directories are present.

2018-11-08 13:33:29.276172059 Exclude list:
2018-11-08 13:33:29.311853451 /tmp/*
2018-11-08 13:33:29.346884726 /dev/shm/*
2018-11-08 13:33:29.381172888 /home/attiq.rehman/*
2018-11-08 13:33:29.430461132 /home/attiq/centos7.iso

But on destination host all files are present

@jsmeix
Copy link
Member

jsmeix commented Nov 8, 2018

@attiqmscs004
to include or exclude only specific stuff and disable ReaR's automatisms
what gets included and excluded it should help to use the config variables
BACKUP_ONLY_INCLUDE and BACKUP_ONLY_EXCLUDE
that exist in recent ReaR versions (I think since version 2.00)
check your usr/share/rear/conf/default.conf whether or not
BACKUP_ONLY_INCLUDE and BACKUP_ONLY_EXCLUDE
are described therein.

Note that BACKUP_ONLY_INCLUDE and BACKUP_ONLY_EXCLUDE
only work for ReaR's internal backup method (usually 'tar')
see usr/share/rear/conf/default.conf
but not for external backup solutions, cf.
"Relax-and-Recover versus backup and restore" at
https://en.opensuse.org/SDB:Disaster_Recovery

@gdha
Copy link
Member

gdha commented Nov 8, 2018

@msoupramanien Thanks for the feedback. Ok, Try the following that works for me (albeit for other directories):
BACKUP_PROG_EXCLUDE=( ${BACKUP_PROG_EXCLUDE[@]} '/opt/apache-tomcat-6.0.33/*' )

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