#591 Issue closed
: Exclude directories from rear backup and restore¶
Labels: waiting for info
, support / question
msoupramanien opened issue at 2015-05-29 19:01:¶
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 commented at 2015-05-31 15:02:¶
You could add the following line to /etc/rear/local.conf
:
EXCLUDE_BACKUP=( ${EXCLUDE_BACKUP[@]} /opt/apache-tomcat-6.0.33 )
msoupramanien commented at 2015-06-01 13:08:¶
Thanks. Will try it out.
gdha commented at 2015-08-06 12:42:¶
@msoupramanien did it work?
attiqmscs004 commented at 2018-11-08 08:33:¶
@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 commented at 2018-11-08 09:36:¶
@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 commented at 2018-11-08 11:58:¶
@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/*' )
[Export of Github issue for rear/rear.]